[PATCH v2 4/8] net: macb: unprepare clocks in case of failure

2020-12-07 Thread Claudiu Beznea
Unprepare clocks in case of any failure in fu540_c000_clk_init(). Fixes: c218ad559020 ("macb: Add support for SiFive FU540-C000") Signed-off-by: Claudiu Beznea --- drivers/net/ethernet/cadence/macb_main.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git

Re: [PATCH V4 3/3] thermal: cpufreq_cooling: Reuse sched_cpu_util() for SMP platforms

2020-12-07 Thread Viresh Kumar
On 03-12-20, 12:54, Dietmar Eggemann wrote: > On 24/11/2020 07:26, Viresh Kumar wrote: > > Several parts of the kernel are already using the effective CPU > > utilization (as seen by the scheduler) to get the current load on the > > CPU, do the same here instead of depending on the idle time of the

Re: [PATCH v2 1/3] KVM: x86: implement KVM_{GET|SET}_TSC_STATE

2020-12-07 Thread Maxim Levitsky
On Sun, 2020-12-06 at 17:19 +0100, Thomas Gleixner wrote: > On Thu, Dec 03 2020 at 19:11, Maxim Levitsky wrote: > > + case KVM_SET_TSC_STATE: { > > + struct kvm_tsc_state __user *user_tsc_state = argp; > > + struct kvm_tsc_state tsc_state; > > + u64 host_tsc, wall_ns

Re: [PATCH v7 03/15] mm/hugetlb: Introduce a new config HUGETLB_PAGE_FREE_VMEMMAP

2020-12-07 Thread David Hildenbrand
On 30.11.20 16:18, Muchun Song wrote: > The purpose of introducing HUGETLB_PAGE_FREE_VMEMMAP is to configure > whether to enable the feature of freeing unused vmemmap associated > with HugeTLB pages. And this is just for dependency check. Now only > support x86. x86 - i386 and x86-64? (I assume th

Re: crypto: sun4i-ss: error with kmap

2020-12-07 Thread Corentin Labbe
On Mon, Dec 07, 2020 at 01:15:49AM +0100, Thomas Gleixner wrote: > On Sun, Dec 06 2020 at 22:40, Corentin Labbe wrote: > > On Sat, Dec 05, 2020 at 08:48:15PM +0100, Thomas Gleixner wrote: > >> So this maps two pages and unmaps the first one. That's all called from > >> sun4i_ss_opti_poll() and the

[PATCH v2] MIPS: Select ARCH_KEEP_MEMBLOCK if DEBUG_KERNEL to enable sysfs memblock debug

2020-12-07 Thread Tiezhu Yang
In the current code, CONFIG_ARCH_KEEP_MEMBLOCK is not set for MIPS arch, memblock_discard() will discard memory and reserved arrays if they were allocated, select ARCH_KEEP_MEMBLOCK if DEBUG_KERNEL to give a chance to track "memory" and "reserved" memblocks after early boot, with this patch, we can

Re: [PATCH 3/3] Serial: Separate out earlycon support

2020-12-07 Thread Akash Asthana
Hi Greg, On 12/7/2020 2:41 PM, Greg KH wrote: On Mon, Dec 07, 2020 at 02:17:27PM +0530, Akash Asthana wrote: Separate out earlycon support from serial driver and remove it's dependency on QUP wrapper driver. This enable us to manage earlycon independently and we can re-use the same earlycon dr

Re: [PATCH 3/3] Serial: Separate out earlycon support

2020-12-07 Thread Akash Asthana
Hi Greg, On 12/7/2020 3:13 PM, Greg KH wrote: On Mon, Dec 07, 2020 at 02:17:27PM +0530, Akash Asthana wrote: Separate out earlycon support from serial driver and remove it's dependency on QUP wrapper driver. This enable us to manage earlycon independently and we can re-use the same earlycon dr

Re: BUG: KCSAN: data-race in tick_nohz_next_event / tick_nohz_stop_tick

2020-12-07 Thread Marco Elver
On Sun, 6 Dec 2020 at 00:47, Thomas Gleixner wrote: > On Sat, Dec 05 2020 at 19:18, Thomas Gleixner wrote: > > On Fri, Dec 04 2020 at 20:53, Marco Elver wrote: > > It might be useful to find the actual variable, data member or whatever > > which is involved in the various reports and if there is a

Re: timers: Move clearing of base::timer_running under base::lock

2020-12-07 Thread Peter Zijlstra
On Mon, Dec 07, 2020 at 02:10:13AM +0100, Frederic Weisbecker wrote: > On Sun, Dec 06, 2020 at 10:40:07PM +0100, Thomas Gleixner wrote: > > syzbot reported KCSAN data races vs. timer_base::timer_running being set to > > NULL without holding base::lock in expire_timers(). > > > > This looks innocen

Re: [PATCH] perf arm pmu: fix build error on MUSL libc

2020-12-07 Thread Namhyung Kim
Hi Chanho, On Mon, Dec 7, 2020 at 8:58 PM Chanho Park wrote: > > Hi Will, > > > Looks like other files just include this unconditionally, but have a > > comment explaining why. See util/branch.h and util/event.h. Maybe we > > should do the same for util/pmu.h, which is already included here? > >

Re: [PATCH] mmc: mediatek: mark PM functions as __maybe_unused

2020-12-07 Thread Paul Cercueil
Hi Arnd, Le ven. 4 déc. 2020 à 15:14, Arnd Bergmann a écrit : On Fri, Dec 4, 2020 at 11:02 AM Ulf Hansson wrote: On Thu, 3 Dec 2020 at 23:29, Arnd Bergmann wrote: > -#ifdef CONFIG_PM > static void msdc_save_reg(struct msdc_host *host) Shouldn't msdc_save|restore_reg() be turned int

Re: [PATCH v6 0/6] Tegra210 audio graph card

2020-12-07 Thread Mark Brown
On Mon, Dec 07, 2020 at 10:22:38AM +0530, Sameer Pujar wrote: > > [1/3] ASoC: dt-bindings: tegra: Add graph bindings > >(no commit info) > > [2/3] ASoC: dt-bindings: tegra: Add json-schema for Tegra audio graph card > >(no commit info) > > [3/3] ASoC: tegra: Add audio graph based c

Re: 0001-add-amlogic-gpio-to-irq

2020-12-07 Thread Linus Walleij
On Mon, Dec 7, 2020 at 12:07 PM Jerome Brunet wrote: > On Mon 07 Dec 2020 at 11:18, Andy Shevchenko > wrote: > > On Fri, Dec 4, 2020 at 4:25 PM Jerome Brunet wrote: > >> On Fri 04 Dec 2020 at 10:13, Linus Walleij > >> wrote: > > > >> This HW only has 8 irqs that can each be mapped to a pin. N

Re: scheduling while atomic in z3fold

2020-12-07 Thread Mike Galbraith
On Mon, 2020-12-07 at 12:52 +0100, Vitaly Wool wrote: > > Thanks. This trace beats me because I don't quite get how this could > have happened. I swear there's a mythical creature loose in there somewhere ;-) Everything looks just peachy up to the instant it goes boom, then you find in the wreckag

Re: [PATCH] mm: memcontrol: optimize per-lruvec stats counter memory usage

2020-12-07 Thread Michal Hocko
On Sun 06-12-20 16:56:39, Muchun Song wrote: > The vmstat threshold is 32 (MEMCG_CHARGE_BATCH), so the type of s32 > of lruvec_stat_cpu is enough. And introduce struct per_cpu_lruvec_stat > to optimize memory usage. How much savings are we talking about here? I am not deeply familiar with the pcp

[PATCH] signal: propagate __user annotations properly

2020-12-07 Thread Lukas Bulwahn
Commit 3eb39f47934f ("signal: add pidfd_send_signal() syscall") introduced copy_siginfo_from_user_any(), but missed to add the __user annotation to the user pointer that is passed as second argument. Hence, when copy_siginfo_from_user_any() calls copy_siginfo_from_user(), sparse warns: kernel/s

Re: [PATCH v7 04/15] mm/hugetlb: Introduce nr_free_vmemmap_pages in the struct hstate

2020-12-07 Thread David Hildenbrand
On 30.11.20 16:18, Muchun Song wrote: > Every HugeTLB has more than one struct page structure. The 2M HugeTLB > has 512 struct page structure and 1G HugeTLB has 4096 struct page > structures. We __know__ that we only use the first 4(HUGETLB_CGROUP_MIN_ORDER) > struct page structures to store metada

[PATCH] bpf: propagate __user annotations properly

2020-12-07 Thread Lukas Bulwahn
__htab_map_lookup_and_delete_batch() stores a user pointer in the local variable ubatch and uses that in copy_{from,to}_user(), but ubatch misses a __user annotation. So, sparse warns in the various assignments and uses of ubatch: kernel/bpf/hashtab.c:1415:24: warning: incorrect type in initial

Re: linux-next: build warning after merge of the akpm tree

2020-12-07 Thread Dmitry Vyukov
On Mon, Dec 7, 2020 at 1:08 PM Dmitry Vyukov wrote: > > > Hi all, > > > > > > After merging the akpm tree, today's linux-next build (powerpc > > > allyesconfig) produced warnings like this: > > > > > > kernel/kcov.c:296:14: warning: conflicting types for built-in function > > > '__sanitizer_cov_t

Re: [PATCH v7 05/15] mm/bootmem_info: Introduce {free,prepare}_vmemmap_page()

2020-12-07 Thread David Hildenbrand
On 30.11.20 16:18, Muchun Song wrote: > In the later patch, we can use the free_vmemmap_page() to free the > unused vmemmap pages and initialize a page for vmemmap page using > via prepare_vmemmap_page(). > > Signed-off-by: Muchun Song > --- > include/linux/bootmem_info.h | 24 ++

Re: [PATCH 2/3] powerpc/smp: Add support detecting thread-groups sharing L2 cache

2020-12-07 Thread Srikar Dronamraju
* Gautham R. Shenoy [2020-12-04 10:18:46]: > From: "Gautham R. Shenoy" > > On POWER systems, groups of threads within a core sharing the L2-cache > can be indicated by the "ibm,thread-groups" property array with the > identifier "2". > > This patch adds support for detecting this, and when pre

Re: [PATCH v2 2/5] thermal: devfreq_cooling: get a copy of device status

2020-12-07 Thread Lukasz Luba
On 12/3/20 4:09 PM, Daniel Lezcano wrote: On 03/12/2020 16:38, Lukasz Luba wrote: On 12/3/20 1:09 PM, Daniel Lezcano wrote: On 18/11/2020 13:03, Lukasz Luba wrote: Devfreq cooling needs to now the correct status of the device in order to operate. Do not rely on Devfreq last_status which m

[PATCH] x86: ia32_setup_rt_frame(): propagate __user annotations properly

2020-12-07 Thread Lukas Bulwahn
Commit 57d563c82925 ("x86: ia32_setup_rt_frame(): consolidate uaccess areas") dropped a __user annotation in a cast when refactoring __put_user() to unsafe_put_user(). Hence, since then, sparse warns in arch/x86/ia32/ia32_signal.c:350:9: warning: cast removes address space '__user' of expressio

[RFC PATCH] do_exit(): panic() recursion detected

2020-12-07 Thread Vladimir Kondratiev
From: Vladimir Kondratiev Recursive do_exit() is symptom of compromised kernel integrity. For safety critical systems, it may be better to panic() in this case to minimize risk. Signed-off-by: Vladimir Kondratiev Change-Id: I42f45900a08c4282c511b05e9e6061360d07db60 --- Documentation/admin-guid

Re: [External] Re: [PATCH v7 03/15] mm/hugetlb: Introduce a new config HUGETLB_PAGE_FREE_VMEMMAP

2020-12-07 Thread Muchun Song
On Mon, Dec 7, 2020 at 8:19 PM David Hildenbrand wrote: > > On 30.11.20 16:18, Muchun Song wrote: > > The purpose of introducing HUGETLB_PAGE_FREE_VMEMMAP is to configure > > whether to enable the feature of freeing unused vmemmap associated > > with HugeTLB pages. And this is just for dependency

Re: [RFC] fpga: dfl: a prototype uio driver

2020-12-07 Thread Tom Rix
On 12/6/20 10:24 PM, Wu, Hao wrote: >> Subject: Re: [RFC] fpga: dfl: a prototype uio driver >> >> On Sun, Dec 06, 2020 at 01:55:54PM -0800, t...@redhat.com wrote: >>> From: Tom Rix >>> >>> >From [PATCH 0/2] UIO support for dfl devices >>> https://lore.kernel.org/linux-fpga/1602828151-24784-1-git

Re: [PATCH v1] gpio: dwapb: mask/unmask IRQ when disable/enable it

2020-12-07 Thread luojiaxing
On 2020/12/6 6:15, Serge Semin wrote: On Tue, Dec 01, 2020 at 04:59:21PM +0800, luojiaxing wrote: On 2020/11/30 19:22, Andy Shevchenko wrote: On Mon, Nov 30, 2020 at 05:36:19PM +0800, Luo Jiaxing wrote: The mask and unmask registers are not configured in dwapb_irq_enable() and dwapb_irq_disa

[RFC PATCH v2] do_exit(): panic() recursion detected

2020-12-07 Thread Vladimir Kondratiev
Recursive do_exit() is symptom of compromised kernel integrity. For safety critical systems, it may be better to panic() in this case to minimize risk. Signed-off-by: Vladimir Kondratiev Change-Id: I42f45900a08c4282c511b05e9e6061360d07db60 --- Documentation/admin-guide/kernel-parameters.txt | 6

Re: vprintk_store: was: [PATCH next v2 3/3] printk: remove logbuf_lock, add syslog_lock

2020-12-07 Thread Petr Mladek
On Sun 2020-12-06 23:36:53, John Ogness wrote: > On 2020-12-04, Petr Mladek wrote: > >> + if (facility == 0) { > >> + while (text_len >= 2 && printk_get_level(text)) { > >> + text_len -= 2; > >> + text += 2; > >> + } > > > > We should avoid two

Re: [PATCH] iommu: Up front sanity check in the arm_lpae_map

2020-12-07 Thread Robin Murphy
On 2020-12-07 12:15, zhukeqian wrote: Hi, On 2020/12/7 20:05, Will Deacon wrote: On Mon, Dec 07, 2020 at 12:01:09PM +, Robin Murphy wrote: On 2020-12-05 08:29, Keqian Zhu wrote: ... then we have more chance to detect wrong code logic. I don't follow that justification - it's still the s

Re: [External] Re: [PATCH v7 03/15] mm/hugetlb: Introduce a new config HUGETLB_PAGE_FREE_VMEMMAP

2020-12-07 Thread David Hildenbrand
On 07.12.20 13:42, Muchun Song wrote: > On Mon, Dec 7, 2020 at 8:19 PM David Hildenbrand wrote: >> >> On 30.11.20 16:18, Muchun Song wrote: >>> The purpose of introducing HUGETLB_PAGE_FREE_VMEMMAP is to configure >>> whether to enable the feature of freeing unused vmemmap associated >>> with HugeT

Re: timers: Move clearing of base::timer_running under base::lock

2020-12-07 Thread Frederic Weisbecker
On Mon, Dec 07, 2020 at 01:25:13PM +0100, Peter Zijlstra wrote: > On Mon, Dec 07, 2020 at 02:10:13AM +0100, Frederic Weisbecker wrote: > > On Sun, Dec 06, 2020 at 10:40:07PM +0100, Thomas Gleixner wrote: > > > syzbot reported KCSAN data races vs. timer_base::timer_running being set > > > to > > >

Re: [PATCH] ACPI: scan: Add PNP0D80 to the _DEP exceptions list

2020-12-07 Thread Rafael J. Wysocki
On Sat, Dec 5, 2020 at 7:41 PM Hans de Goede wrote: > > Hi, > > On 12/5/20 4:29 PM, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > > > The PNP0D80 ("Windows-compatible System Power Management Controller") > > device ID is used for identifying the special device object providing > > the

Re: [patch 5/8] ntp: Make the RTC synchronization more reliable

2020-12-07 Thread Miroslav Lichvar
On Sun, Dec 06, 2020 at 10:46:18PM +0100, Thomas Gleixner wrote: > Switch it to an hrtimer instead which schedules the actual update work. The > hrtimer will expire precisely (max 1 jiffie delay when high resolution > timers are not available). The actual scheduling delay of the work is the > same

Re: linux-next: build warning after merge of the akpm tree

2020-12-07 Thread Marco Elver
On Mon, 7 Dec 2020 at 13:38, 'Dmitry Vyukov' via kasan-dev wrote: > On Mon, Dec 7, 2020 at 1:08 PM Dmitry Vyukov wrote: > > > > Hi all, > > > > > > > > After merging the akpm tree, today's linux-next build (powerpc > > > > allyesconfig) produced warnings like this: > > > > > > > > kernel/kcov.c:2

Re: [RFC PATCH] do_exit(): panic() recursion detected

2020-12-07 Thread Peter Zijlstra
On Mon, Dec 07, 2020 at 02:40:49PM +0200, Vladimir Kondratiev wrote: > From: Vladimir Kondratiev > > Recursive do_exit() is symptom of compromised kernel integrity. > For safety critical systems, it may be better to > panic() in this case to minimize risk. You've not answered the previously pose

Re: [RFC PATCH v2] do_exit(): panic() recursion detected

2020-12-07 Thread Vladimir Kondratiev
Please ignore version 1 of the patch - it was sent from wrong mail address. To clarify the reason: Situation where do_exit() re-entered, discovered by static code analysis. For safety critical system, it is better to panic() when minimal chance of corruption detected. For this reason, we also p

Re: [RESEND PATCH v2 01/12] mm: memcontrol: fix NR_ANON_THPS account

2020-12-07 Thread Michal Hocko
On Sun 06-12-20 18:14:40, Muchun Song wrote: > The unit of NR_ANON_THPS is HPAGE_PMD_NR already. So it should inc/dec > by one rather than nr_pages. > > Fixes: 468c398233da ("mm: memcontrol: switch to native NR_ANON_THPS counter") > Signed-off-by: Muchun Song Acked-by: Michal Hocko > --- > mm

WARNING: ODEBUG bug in slave_kobj_release

2020-12-07 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:34816d20 Merge tag 'gfs2-v5.10-rc5-fixes' of git://git.ker.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=153f779d50 kernel config: https://syzkaller.appspot.com/x/.config?x=e49433cfed49b7d9 das

WARNING: filesystem loop0 was created with 512 inodes, the real maximum is 511, mounting anywa

2020-12-07 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:34816d20 Merge tag 'gfs2-v5.10-rc5-fixes' of git://git.ker.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=157dad0750 kernel config: https://syzkaller.appspot.com/x/.config?x=b3a044ccf5b03ac4 das

[PATCH 2/5] ASoC: codecs/jz4770: Reset interrupt flags in bias PREPARE

2020-12-07 Thread Paul Cercueil
From: Christophe Branchereau In case a poll for RUP times out, we might be left with some IRQ flags that should be cleared before the next power on. Signed-off-by: Christophe Branchereau Signed-off-by: Paul Cercueil --- sound/soc/codecs/jz4770.c | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH 1/5] ASoC: codecs/jz47xx: Use regmap_{set,clear}_bits

2020-12-07 Thread Paul Cercueil
Use regmap_{set,clear}_bits instead of regmap_update_bits, when applicable. Signed-off-by: Paul Cercueil --- sound/soc/codecs/jz4725b.c | 26 ++-- sound/soc/codecs/jz4740.c | 20 +++-- sound/soc/codecs/jz4770.c | 85 +- 3 files changed, 55 insert

[PATCH 3/5] ASoC: codecs/jz4770: Adjust timeouts for cap-coupled outputs

2020-12-07 Thread Paul Cercueil
From: Christophe Branchereau When using cap-coupled outputs, the RUP/RDO can take much longer than the 100ms timeout we used to have. Increase that timeout to one second. Signed-off-by: Christophe Branchereau Signed-off-by: Paul Cercueil --- sound/soc/codecs/jz4770.c | 8 1 file chan

[PATCH 4/5] ASoC: codecs/jz4770: Don't change cap-couple setting in HP PMU/PMD

2020-12-07 Thread Paul Cercueil
There is simply no reason to do that. Signed-off-by: Paul Cercueil --- sound/soc/codecs/jz4770.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/jz4770.c b/sound/soc/codecs/jz4770.c index 0da966785aee..909b70e817b4 100644 --- a/sound/soc/codecs/jz4770

Re: [PATCH next v2 2/3] printk: change @clear_seq to atomic64_t

2020-12-07 Thread Peter Zijlstra
On Mon, Dec 07, 2020 at 11:09:39AM +0106, John Ogness wrote: > That will not work. We are talking about a situation where the writer is > preempted. So seq will never equal seq_copy in that situation. I expect > that the seqcount_latch is necessary. Interrupted rather, I would think, specifically

Re: [RFC PATCH] do_exit(): panic() recursion detected

2020-12-07 Thread Vladimir Kondratiev
We do panic on oops as well. We panic on anything that may point to system stability issues. I can't proof this code can't be reached without oops, so I want to panic here as well. On 12/7/20 2:51 PM, Peter Zijlstra wrote: On Mon, Dec 07, 2020 at 02:40:49PM +0200, Vladimir Kondratiev wrote: F

Re: [iov_iter] 9bd0e337c6: will-it-scale.per_process_ops -4.8% regression

2020-12-07 Thread Oliver Sang
Hi David, On Fri, Dec 04, 2020 at 11:51:48AM +, David Howells wrote: > kernel test robot wrote: > > > FYI, we noticed a -4.8% regression of will-it-scale.per_process_ops due to > > commit: > > > > > > commit: 9bd0e337c633aed3e8ec3c7397b7ae0b8436f163 ("[PATCH 01/29] iov_iter: > > Switch t

Re: [PATCH next v2 2/3] printk: change @clear_seq to atomic64_t

2020-12-07 Thread Petr Mladek
On Mon 2020-12-07 11:09:39, John Ogness wrote: > On 2020-12-07, Peter Zijlstra wrote: > >> Yes, and it is read-only access. Perhaps atomic64_t is the wrong thing > >> to use here. We could use a seqcount_latch and a shadow variable so that > >> if a writer has been preempted, we can use the previo

Re: [External] Re: [PATCH] mm: memcontrol: optimize per-lruvec stats counter memory usage

2020-12-07 Thread Muchun Song
On Mon, Dec 7, 2020 at 8:36 PM Michal Hocko wrote: > > On Sun 06-12-20 16:56:39, Muchun Song wrote: > > The vmstat threshold is 32 (MEMCG_CHARGE_BATCH), so the type of s32 > > of lruvec_stat_cpu is enough. And introduce struct per_cpu_lruvec_stat > > to optimize memory usage. > > How much savings

[PATCH 5/5] ASoC: codecs/jz4770: Add DAPM widget to set HP out to cap-less mode

2020-12-07 Thread Paul Cercueil
Cap-less mode is useful e.g. if the headphones are used as an antenna for a FM radio, so that the signal is not altered. For everything else, we want the cap-couple mode. Signed-off-by: Paul Cercueil --- sound/soc/codecs/jz4770.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) dif

Re: [RESEND PATCH v2 00/12] Convert all vmstat counters to pages or bytes

2020-12-07 Thread Michal Hocko
On Sun 06-12-20 18:14:39, Muchun Song wrote: > Hi, > > This patch series is aimed to convert all THP vmstat counters to pages > and some KiB vmstat counters to bytes. > > The unit of some vmstat counters are pages, some are bytes, some are > HPAGE_PMD_NR, and some are KiB. When we want to expose

Re: [PATCH 0/2] RFC: Precise TSC migration

2020-12-07 Thread Maxim Levitsky
On Thu, 2020-12-03 at 17:18 -0300, Marcelo Tosatti wrote: > On Thu, Dec 03, 2020 at 01:39:42PM +0200, Maxim Levitsky wrote: > > On Tue, 2020-12-01 at 16:48 -0300, Marcelo Tosatti wrote: > > > On Tue, Dec 01, 2020 at 02:30:39PM +0200, Maxim Levitsky wrote: > > > > On Mon, 2020-11-30 at 16:16 -0300,

[PATCH 1/4] usb: musb: Add and use inline functions musb_{get,set}_state

2020-12-07 Thread Paul Cercueil
Instead of manipulating musb->xceiv->otg->state directly, use the newly introduced musb_get_state() and musb_set_state() inline functions. Later, these inline functions will be modified to get rid of the musb->xceiv dependency, which prevents the musb code from using the generic PHY subsystem. Si

Re: [PATCH v2] Revert "ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks"

2020-12-07 Thread Rafael J. Wysocki
On Sat, Dec 5, 2020 at 7:42 PM Daniel Scally wrote: > > This reverts commit 8a66790b7850a6669129af078768a1d42076a0ef. > > Switching this function to AE_CTRL_TERMINATE broke the documented > behaviour of acpi_dev_get_resources() - AE_CTRL_TERMINATE does not, in > fact, terminate the resource walk b

Re: [PATCH v1] gpio: dwapb: mask/unmask IRQ when disable/enable it

2020-12-07 Thread luojiaxing
On 2020/12/6 23:02, Linus Walleij wrote: On Sat, Dec 5, 2020 at 11:15 PM Serge Semin wrote: Hmm, that sounds like a problem, but the explanation is a bit unclear to me. AFAICS you are saying that the only callbacks which are called during the IRQ request/release are the irq_enable(), right?

[PATCH 2/4] usb: musb: Add and use inline function musb_otg_state_string

2020-12-07 Thread Paul Cercueil
The musb_otg_state_string() simply calls usb_otg_state_string(). This will make it easier to get rid of the musb->xceiv dependency later. Signed-off-by: Paul Cercueil --- drivers/usb/musb/musb_core.c| 43 +++-- drivers/usb/musb/musb_core.h| 5 drivers/us

[PATCH 3/4] usb: musb: Allow running without a PHY

2020-12-07 Thread Paul Cercueil
Some platforms (e.g. JZ4740) can run without a PHY. Modify the core so that musb->xceiv is never deferenced without being checked first. Signed-off-by: Paul Cercueil --- drivers/usb/musb/musb_core.c| 2 +- drivers/usb/musb/musb_core.h| 12 ++-- drivers/usb/musb/musb_gadget.c |

Re: [PATCH] signal: propagate __user annotations properly

2020-12-07 Thread Christian Brauner
On Mon, Dec 07, 2020 at 01:36:10PM +0100, Lukas Bulwahn wrote: > Commit 3eb39f47934f ("signal: add pidfd_send_signal() syscall") introduced > copy_siginfo_from_user_any(), but missed to add the __user annotation to > the user pointer that is passed as second argument. > > Hence, when copy_siginfo_

Re: [PATCH] ACPI: Add DMI quirk for GIGABYTE GB-BXBT-2807

2020-12-07 Thread Rafael J. Wysocki
On Wed, Dec 2, 2020 at 7:41 AM Chris Chiu wrote: > > From: "Jasper St. Pierre" > > The GIGABYTE GB-BXBT-2807 is a mini-PC which uses off the shelf > components, like an Intel GPU which is meant for mobile systems. > As such, it, by default, has a backlight controller exposed. > > Unfortunately, t

Re: [PATCH] signal: propagate __user annotations properly

2020-12-07 Thread Lukas Bulwahn
On Mon, Dec 7, 2020 at 2:04 PM Christian Brauner wrote: > > On Mon, Dec 07, 2020 at 01:36:10PM +0100, Lukas Bulwahn wrote: > > Commit 3eb39f47934f ("signal: add pidfd_send_signal() syscall") introduced > > copy_siginfo_from_user_any(), but missed to add the __user annotation to > > the user pointe

Re: [patch V2 1/9] softirq: Add RT specific softirq accounting

2020-12-07 Thread Frederic Weisbecker
On Fri, Dec 04, 2020 at 06:01:52PM +0100, Thomas Gleixner wrote: > From: Thomas Gleixner > > RT requires the softirq processing and local bottomhalf disabled regions to > be preemptible. Using the normal preempt count based serialization is > therefore not possible because this implicitely disabl

Re: [RFC] fpga: dfl: a prototype uio driver

2020-12-07 Thread Tom Rix
On 12/7/20 12:02 AM, Greg KH wrote: > On Sun, Dec 06, 2020 at 01:55:54PM -0800, t...@redhat.com wrote: >> From: Tom Rix >> >> >From [PATCH 0/2] UIO support for dfl devices >> https://lore.kernel.org/linux-fpga/1602828151-24784-1-git-send-email-yilun...@intel.com/ > Why is this here? As referenc

[PATCH 4/4] usb: musb: Support setting OTG mode using generic PHY

2020-12-07 Thread Paul Cercueil
When musb->xceiv is not provided but musb->phy is, support setting the OTG mode (host, peripheral) using the generic PHY framework. Signed-off-by: Paul Cercueil --- drivers/usb/musb/musb_gadget.c | 4 drivers/usb/musb/musb_host.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/driv

Re: timers: Move clearing of base::timer_running under base::lock

2020-12-07 Thread Sebastian Andrzej Siewior
On 2020-12-06 22:40:07 [+0100], Thomas Gleixner wrote: > syzbot reported KCSAN data races vs. timer_base::timer_running being set to > NULL without holding base::lock in expire_timers(). > > This looks innocent and most reads are clearly not problematic but for a > non-RT kernel it's completely ir

pci 0000:00:07.0: DPC: RP PIO log size 0 is invalid

2020-12-07 Thread Paul Menzel
[Bringing the issue up on the list in case the Linux Bugzilla is not monitored/used.] Dear Linux folks, On Intel Tiger Lake Dell laptop, Linux logs the error below [1]. [0.507307] pci :00:07.0: DPC: RP PIO log size 0 is invalid [0.508835] pci :00:07.2: DPC: RP PIO log

Re: Why the auxiliary cipher in gss_krb5_crypto.c?

2020-12-07 Thread Ard Biesheuvel
On Mon, 7 Dec 2020 at 13:02, David Howells wrote: > > Ard Biesheuvel wrote: > > > > Yeah - the problem with that is that for sunrpc, we might be dealing with > > > 1MB > > > plus bits of non-contiguous pages, requiring >8K of scatterlist elements > > > (admittedly, we can chain them, but we may

Re: WARNING: filesystem loop0 was created with 512 inodes, the real maximum is 511, mounting anywa

2020-12-07 Thread Dmitry Vyukov
#syz fix: bfs: don't use WARNING: string when it's just info. On Mon, Dec 7, 2020 at 1:53 PM syzbot wrote: > > Hello, > > syzbot found the following issue on: > > HEAD commit:34816d20 Merge tag 'gfs2-v5.10-rc5-fixes' of git://git.ker.. > git tree: upstream > console output: https://syzk

Re: [PATCH v1] gpio: dwapb: mask/unmask IRQ when disable/enable it

2020-12-07 Thread luojiaxing
On 2020/12/7 2:50, Marc Zyngier wrote: On 2020-12-06 15:02, Linus Walleij wrote: On Sat, Dec 5, 2020 at 11:15 PM Serge Semin wrote: Hmm, that sounds like a problem, but the explanation is a bit unclear to me. AFAICS you are saying that the only callbacks which are called during the IRQ req

Re: [PATCH v3] drivers/virt: vmgenid: add vm generation id driver

2020-12-07 Thread Alexander Graf
On 27.11.20 19:26, Catangiu, Adrian Costin wrote: - Background The VM Generation ID is a feature defined by Microsoft (paper: http://go.microsoft.com/fwlink/?LinkId=260709) and supported by multiple hypervisor vendors. The feature is required in virtualized environments by apps that work with

Re: [External] Re: [PATCH v7 04/15] mm/hugetlb: Introduce nr_free_vmemmap_pages in the struct hstate

2020-12-07 Thread Muchun Song
On Mon, Dec 7, 2020 at 8:36 PM David Hildenbrand wrote: > > On 30.11.20 16:18, Muchun Song wrote: > > Every HugeTLB has more than one struct page structure. The 2M HugeTLB > > has 512 struct page structure and 1G HugeTLB has 4096 struct page > > structures. We __know__ that we only use the first

Re: [PATCH 3/3] powerpc/cacheinfo: Print correct cache-sibling map/list for L2 cache

2020-12-07 Thread Srikar Dronamraju
* Gautham R. Shenoy [2020-12-04 10:18:47]: > From: "Gautham R. Shenoy" > > > Signed-off-by: Gautham R. Shenoy > --- > > +extern bool thread_group_shares_l2; > /* > * On big-core systems, each core has two groups of CPUs each of which > * has its own L1-cache. The thread-siblings which s

Re: WARNING: filesystem loop3 was created with 512 inodes, the real maximum is 511, mounting anyway

2020-12-07 Thread Dmitry Vyukov
#syz fix: bfs: don't use WARNING: string when it's just info. On Thu, Sep 24, 2020 at 11:40 AM syzbot wrote: > > Hello, > > syzbot found the following issue on: > > HEAD commit:98477740 Merge branch 'rcu/urgent' of git://git.kernel.org.. > git tree: upstream > console output: https://sy

Re: WARNING: filesystem loop2 was created with 512 inodes, the real maximum is 511, mounting anyway

2020-12-07 Thread Dmitry Vyukov
#syz fix: bfs: don't use WARNING: string when it's just info. On Sat, Nov 21, 2020 at 8:33 AM syzbot wrote: > > Hello, > > syzbot found the following issue on: > > HEAD commit:09162bc3 Linux 5.10-rc4 > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=16e9a4

Re: WARNING: filesystem loop1 was created with 512 inodes, the real maximum is 511, mounting anyway

2020-12-07 Thread Dmitry Vyukov
#syz fix: bfs: don't use WARNING: string when it's just info. On Mon, Sep 28, 2020 at 8:10 PM syzbot wrote: > > Hello, > > syzbot found the following issue on: > > HEAD commit:c9c9e6a4 Merge tag 'trace-v5.9-rc5-2' of git://git.kernel... > git tree: upstream > console output: https://syz

Re: WARNING: filesystem loop4 was created with 512 inodes, the real maximum is 511, mounting anyway

2020-12-07 Thread Dmitry Vyukov
#syz fix: bfs: don't use WARNING: string when it's just info. On Sat, Nov 21, 2020 at 8:33 AM syzbot wrote: > > Hello, > > syzbot found the following issue on: > > HEAD commit:09162bc3 Linux 5.10-rc4 > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=103f4f

Re: WARNING: filesystem loop0 was created with 512 inodes, the real maximum is 511, mounting anyway

2020-12-07 Thread Dmitry Vyukov
On Mon, Sep 28, 2020 at 11:08 AM Tigran Aivazian wrote: > > On Mon, 28 Sep 2020 at 09:29, Dmitry Vyukov wrote: > > On Mon, Sep 28, 2020 at 10:23 AM Tigran Aivazian > > > No, this is not an issue. In the latest change to BFS I added the > > > following comment to the header fs/bfs/bfs.h, which exp

Re: [V9fs-developer] [RFC PATCH] 9p: create writeback fid on shared mmap

2020-12-07 Thread Chengguang Xu
在 星期一, 2020-12-07 19:24:10 Dominique Martinet 撰写 > Chengguang Xu wrote on Mon, Dec 07, 2020: > > > , VM_MAYWRITE is set anytime we have a shared map where file has > > > been opened read-write, which seems to be what you want with regards to > > > protecting from mprotect calls.

Re: [PATCH] ACPI: fan: fix warning with CONFIG_DEBUG_LOCK_ALLOC

2020-12-07 Thread Rafael J. Wysocki
On Fri, Dec 4, 2020 at 7:27 PM Pierre-Louis Bossart wrote: > > On a TigerLake device with CONFIG_DEBUG_LOCK_ALLOC the following > warning is thrown: > > [ 13.784413] BUG: key 88810ea5a080 has not been registered! > [ 13.784722] DEBUG_LOCKS_WARN_ON(1) > [ 13.784737] WARNING: CPU: 2 PID: 1

Re: [PATCH v2 1/3] KVM: x86: implement KVM_{GET|SET}_TSC_STATE

2020-12-07 Thread Vitaly Kuznetsov
Maxim Levitsky writes: > > But other than that I don't mind making TSC offset global per VM thing. > Paulo, what do you think about this? > Not Paolo here but personally I'd very much prefer we go this route but unsynchronized TSCs are, unfortunately, still a thing: I was observing it on an AMD

Re: [PATCH v5 1/5] perf metric: Restructure struct expr_parse_ctx.

2020-12-07 Thread Namhyung Kim
Hi Ian, On Wed, Dec 2, 2020 at 4:40 PM Ian Rogers wrote: > > A later change to parsing the ids out (in expr__find_other) will > potentially drop hashmaps and so it is more convenient to move > expr_parse_ctx to have a hashmap pointer rather than a struct value. As > this pointer must be freed, ra

Re: [iov_iter] 9bd0e337c6: will-it-scale.per_process_ops -4.8% regression

2020-12-07 Thread David Howells
Oliver Sang wrote: > > Out of interest, would it be possible for you to run this on the tail of the > > series on the same hardware? > > sorry for late. below is the result adding the tail of the series: > * ded69a6991fe0 > (linux-review/David-Howells/RFC-iov_iter-Switch-to-using-an-ops-table/2

Re: [PATCH] arm64: dts: imx8mn: Fix duplicate node name

2020-12-07 Thread Krzysztof Kozlowski
On Mon, Dec 07, 2020 at 02:53:24PM +0800, Shengjiu Wang wrote: > Error log: > sysfs: cannot create duplicate filename '/bus/platform/devices/3000.bus' > > The spba bus name is duplicate with aips bus name. > Refine spba bus name to fix this issue. > > Fixes: 970406eaef3a ("arm64: dts: imx8mn:

Re: [External] Re: [PATCH v7 03/15] mm/hugetlb: Introduce a new config HUGETLB_PAGE_FREE_VMEMMAP

2020-12-07 Thread Muchun Song
On Mon, Dec 7, 2020 at 8:47 PM David Hildenbrand wrote: > > On 07.12.20 13:42, Muchun Song wrote: > > On Mon, Dec 7, 2020 at 8:19 PM David Hildenbrand wrote: > >> > >> On 30.11.20 16:18, Muchun Song wrote: > >>> The purpose of introducing HUGETLB_PAGE_FREE_VMEMMAP is to configure > >>> whether to

Re: [PATCH v2] drivers/virt: vmgenid: add vm generation id driver

2020-12-07 Thread Alexander Graf
On 27.11.20 18:17, Catangiu, Adrian Costin wrote: On 18/11/2020 12:30, Alexander Graf wrote: On 16.11.20 16:34, Catangiu, Adrian Costin wrote: - Future improvements Ideally we would want the driver to register itself based on devices' _CID and not _HID, but unfortunately I couldn't find a

Re: [PATCH v5 4/5] perf metric: Add utilities to work on ids map.

2020-12-07 Thread Namhyung Kim
On Wed, Dec 2, 2020 at 4:40 PM Ian Rogers wrote: > > Add utilities to new/free an ids hashmap, as well as to union. Add > testing of the union. Unioning hashmaps will be used when parsing the > metric, if a value is known then the hashmap is unnecessary, otherwise > we need to union together all t

[PATCH v2 bpf-next 00/13] Socket migration for SO_REUSEPORT.

2020-12-07 Thread Kuniyuki Iwashima
The SO_REUSEPORT option allows sockets to listen on the same port and to accept connections evenly. However, there is a defect in the current implementation[1]. When a SYN packet is received, the connection is tied to a listening socket. Accordingly, when the listener is closed, in-flight requests

Re: [PATCH 0/3] perf tools: Allow to enable/disable events via control pipe

2020-12-07 Thread Namhyung Kim
Hi Jiri, On Mon, Dec 7, 2020 at 2:05 AM Jiri Olsa wrote: > > hi, > adding support to enable/disable specific events via control > file via following commands: > > # echo enable-sched:sched_process_fork > control > # echo disabled-sched:sched_process_fork > control > > The code is availabl

[PATCH v2 bpf-next 01/13] tcp: Allow TCP_CLOSE sockets to hold the reuseport group.

2020-12-07 Thread Kuniyuki Iwashima
This patch is a preparation patch to migrate incoming connections in the later commits and adds a field (num_closed_socks) to the struct sock_reuseport to allow TCP_CLOSE sockets to access to the reuseport group. When we close a listening socket, to migrate its connections to another listener in t

Re: [External] Re: [PATCH v7 05/15] mm/bootmem_info: Introduce {free,prepare}_vmemmap_page()

2020-12-07 Thread Muchun Song
On Mon, Dec 7, 2020 at 8:39 PM David Hildenbrand wrote: > > On 30.11.20 16:18, Muchun Song wrote: > > In the later patch, we can use the free_vmemmap_page() to free the > > unused vmemmap pages and initialize a page for vmemmap page using > > via prepare_vmemmap_page(). > > > > Signed-off-by: Much

Re: 0001-add-amlogic-gpio-to-irq

2020-12-07 Thread Jerome Brunet
On Mon 07 Dec 2020 at 13:34, Linus Walleij wrote: > On Mon, Dec 7, 2020 at 12:07 PM Jerome Brunet wrote: >> On Mon 07 Dec 2020 at 11:18, Andy Shevchenko >> wrote: >> > On Fri, Dec 4, 2020 at 4:25 PM Jerome Brunet wrote: >> >> On Fri 04 Dec 2020 at 10:13, Linus Walleij >> >> wrote: >> > >>

[PATCH v2 bpf-next 02/13] bpf: Define migration types for SO_REUSEPORT.

2020-12-07 Thread Kuniyuki Iwashima
As noted in the preceding commit, there are two migration types. In addition to that, the kernel will run the same eBPF program to select a listener for SYN packets. This patch defines three types to signal the kernel and the eBPF program if it is receiving a new request or migrating ESTABLISHED/S

[PATCH v2 bpf-next 04/13] tcp: Introduce inet_csk_reqsk_queue_migrate().

2020-12-07 Thread Kuniyuki Iwashima
This patch defines a new function to migrate ESTABLISHED/SYN_RECV sockets. Listening sockets hold incoming connections as a linked list of struct request_sock in the accept queue, and each request has reference to its full socket and listener. In inet_csk_reqsk_queue_migrate(), we only unlink the

[PATCH v2 bpf-next 03/13] Revert "locking/spinlocks: Remove the unused spin_lock_bh_nested() API"

2020-12-07 Thread Kuniyuki Iwashima
This reverts commit 607904c357c61adf20b8fd18af765e501d61a385 to use spin_lock_bh_nested() in the next commit. Link: https://lore.kernel.org/netdev/9d290a57-49e1-04cd-2487-262b0d7c5...@gmail.com/ Signed-off-by: Kuniyuki Iwashima CC: Waiman Long --- include/linux/spinlock.h | 8

[PATCH v2 bpf-next 05/13] tcp: Set the new listener to migrated TFO requests.

2020-12-07 Thread Kuniyuki Iwashima
A TFO request socket is only freed after BOTH 3WHS has completed (or aborted) and the child socket has been accepted (or its listener has been closed). Hence, depending on the order, there can be two kinds of request sockets in the accept queue. 3WHS -> accept : TCP_ESTABLISHED accept -> 3WHS

Re: [patch V2 2/9] irqtime: Make accounting correct on RT

2020-12-07 Thread Frederic Weisbecker
On Fri, Dec 04, 2020 at 06:01:53PM +0100, Thomas Gleixner wrote: > vtime_account_irq and irqtime_account_irq() base checks on preempt_count() > which fails on RT because preempt_count() does not contain the softirq > accounting which is seperate on RT. > > These checks do not need the full preempt

[PATCH v2 bpf-next 06/13] tcp: Migrate TCP_ESTABLISHED/TCP_SYN_RECV sockets in accept queues.

2020-12-07 Thread Kuniyuki Iwashima
This patch lets reuseport_detach_sock() return a pointer of struct sock, which is used only by inet_unhash(). If it is not NULL, inet_csk_reqsk_queue_migrate() migrates TCP_ESTABLISHED/TCP_SYN_RECV sockets from the closing listener to the selected one. By default, the kernel selects a new listener

[PATCH v2 bpf-next 08/13] bpf: Introduce two attach types for BPF_PROG_TYPE_SK_REUSEPORT.

2020-12-07 Thread Kuniyuki Iwashima
This commit adds new bpf_attach_type for BPF_PROG_TYPE_SK_REUSEPORT to check if the attached eBPF program is capable of migrating sockets. When the eBPF program is attached, the kernel runs it for socket migration only if the expected_attach_type is BPF_SK_REUSEPORT_SELECT_OR_MIGRATE. The kernel w

[PATCH v2 bpf-next 09/13] libbpf: Set expected_attach_type for BPF_PROG_TYPE_SK_REUSEPORT.

2020-12-07 Thread Kuniyuki Iwashima
This commit introduces a new section (sk_reuseport/migrate) and sets expected_attach_type to two each section in BPF_PROG_TYPE_SK_REUSEPORT program. Signed-off-by: Kuniyuki Iwashima --- tools/lib/bpf/libbpf.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/lib/bpf/l

[PATCH v2 bpf-next 10/13] bpf: Add migration to sk_reuseport_(kern|md).

2020-12-07 Thread Kuniyuki Iwashima
This patch adds u8 migration field to sk_reuseport_kern and sk_reuseport_md to signal the eBPF program if the kernel calls it for selecting a listener for SYN or migrating sockets in the accept queue or an immature socket during 3WHS. Note that this field is accessible only if the attached type is

<    1   2   3   4   5   6   7   8   9   10   >