Re: [PATCH] x86_64: Mark per-cpu symbols as absolute.

2018-12-12 Thread Tri Vo
Adding appropriate people, lists. On Tue, Dec 11, 2018 at 11:39 AM Nick Desaulniers wrote: > > On Mon, Dec 10, 2018 at 4:57 PM Tri Vo wrote: > > > > From: Rafael Avila de Espindola > > > > The kernel has many variables that it wants to have a copy for each >

Re: [RFC PATCH] x86_64: Add "-m elf_i386" when linking i386 object files.

2018-12-12 Thread Tri Vo
Adding appropriate people, lists. On Tue, Dec 11, 2018 at 1:07 PM Nick Desaulniers wrote: > > On Mon, Dec 10, 2018 at 2:50 PM Nick Desaulniers > wrote: > > > > On Mon, Dec 10, 2018 at 2:26 PM Tri Vo wrote: > > > > > > From: George Rimar > > &g

Re: [RFC PATCH] x86_64: Add "-m elf_i386" when linking i386 object files.

2019-01-07 Thread Tri Vo
Re-sending as plain text. Sorry. On Mon, Jan 7, 2019 at 3:11 PM Tri Vo wrote: > > Hello, hope everyone's had great holidays. > Could someone review at this patch? > > On Tue, Dec 18, 2018 at 3:39 AM George Rimar wrote: >> >> Added Rui, an LLD code owner. >&g

Re: [PATCH v2] module: add stubs for within_module functions

2019-04-16 Thread Tri Vo
On Tue, Apr 16, 2019 at 8:21 AM Jessica Yu wrote: > > +++ Tri Vo [15/04/19 11:18 -0700]: > >Provide stubs for within_module_core(), within_module_init(), and > >within_module() to prevent build errors when !CONFIG_MODULES. > > > >v2: > >- Generalized commit mes

Re: [PATCH v2] module: add stubs for within_module functions

2019-04-16 Thread Tri Vo
On Tue, Apr 16, 2019 at 10:55 AM Tri Vo wrote: > > On Tue, Apr 16, 2019 at 8:21 AM Jessica Yu wrote: > > > > +++ Tri Vo [15/04/19 11:18 -0700]: > > >Provide stubs for within_module_core(), within_module_init(), and > > >within_module() to prevent build errors

[PATCH v5] gcov: Clang support

2019-04-17 Thread Tri Vo
o-authored-by: Nick Desaulniers Co-authored-by: Tri Vo Signed-off-by: Greg Hackmann Signed-off-by: Nick Desaulniers Signed-off-by: Tri Vo Tested-by: Trilok Soni Tested-by: Prasad Sodagudi Tested-by: Tri Vo Tested-by: Daniel Mentz Tested-by: Petri Gynther Reviewed-by: Peter Oberparleiter ---

Re: [PATCH v5] gcov: Clang support

2019-04-17 Thread Tri Vo
On Wed, Apr 17, 2019 at 4:21 PM Andrew Morton wrote: > > On Wed, 17 Apr 2019 15:53:28 -0700 Tri Vo wrote: > > > LLVM uses profiling data that's deliberately similar to GCC, but has a very > > different way of exporting that data. LLVM calls llvm_gcov_init() once per

Re: Regression with PM / wakeup: Show wakeup sources stats in sysfs"

2020-05-30 Thread Tri Vo
On Sat, May 30, 2020 at 11:52 AM Florian Fainelli wrote: > > > > On 5/29/2020 4:14 PM, Tri Vo wrote: > > On Fri, May 29, 2020 at 3:37 PM Florian Fainelli > > wrote: > >> > >> On 5/29/20 3:28 PM, Tri Vo wrote: > >>> On Fri, May 29, 2020 at 9:

[PATCH v4 3/3] gcov: docs: add a note on GCC vs Clang differences

2019-03-17 Thread Tri Vo
;gcov: remove CONFIG_GCOV_FORMAT_AUTODETECT"). Signed-off-by: Tri Vo Reviewed-by: Peter Oberparleiter --- Documentation/dev-tools/gcov.rst | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Documentation/dev-tools/gcov.rst b/Documentation/dev-tools/gcov

[PATCH v4 0/3] gcov: add Clang support

2019-03-17 Thread Tri Vo
gcov: Clang support Tri Vo (1): gcov: docs: add a note on GCC vs Clang differences Documentation/dev-tools/gcov.rst | 18 +- kernel/gcov/Kconfig | 3 +- kernel/gcov/Makefile | 5 +- kernel/gcov/base.c | 86 + kernel/gcov/clang.c | 586

[PATCH v4 1/3] gcov: Clang: move common GCC code into gcc_base.c

2019-03-17 Thread Tri Vo
From: Greg Hackmann base.c contains a few callbacks specific to GCC's gcov implementation. Move these into their own module in preparation for Clang support. Signed-off-by: Greg Hackmann Signed-off-by: Nick Desaulniers Signed-off-by: Tri Vo Tested-by: Trilok Soni Tested-by: Prasad Sod

[PATCH v4 2/3] gcov: Clang support

2019-03-17 Thread Tri Vo
o-authored-by: Nick Desaulniers Co-authored-by: Tri Vo Signed-off-by: Greg Hackmann Signed-off-by: Nick Desaulniers Signed-off-by: Tri Vo Tested-by: Trilok Soni Tested-by: Prasad Sodagudi Tested-by: Tri Vo Tested-by: Daniel Mentz Tested-by: Petri Gynther Reviewed-by: Peter Oberparleite

Re: "PM / wakeup: Show wakeup sources stats in sysfs" causes boot warnings

2019-08-14 Thread Tri Vo
On Wed, Aug 14, 2019 at 1:40 AM Tony Lindgren wrote: > > * Stephen Boyd [691231 23:00]: > > I also notice that device_set_wakeup_capable() has a check to see if the > > device is registered yet and it skips creating sysfs entries for the > > device if it isn't created in sysfs yet. Why? Just so i

Re: [PATCH] PM / wakeup: Register wakeup class kobj after device is added

2019-08-16 Thread Tri Vo
hen the device is already registered, or > from dpm_sysfs_add() when the device is being registered with the driver > core via device_add(). > > Fixes: 986845e747af ("PM / wakeup: Show wakeup sources stats in sysfs") > Reported-by: Qian Cai > Cc: Qian Cai > Cc: Tri

Re: [PATCH] PM / wakeup: Register wakeup class kobj after device is added

2019-08-16 Thread Tri Vo
On Fri, Aug 16, 2019 at 2:46 PM Stephen Boyd wrote: > > Quoting Tri Vo (2019-08-16 14:27:35) > > On Fri, Aug 16, 2019 at 7:56 AM Stephen Boyd wrote: > > > diff --git a/drivers/base/power/sysfs.c b/drivers/base/power/sysfs.c > > > index 1b9c281cbe41..27ee00f50bd7 1

Re: [PATCH v2] PM / wakeup: Register wakeup class kobj after device is added

2019-08-19 Thread Tri Vo
hen the device is already registered, or > from dpm_sysfs_add() when the device is being registered with the driver > core via device_add(). > > Fixes: 986845e747af ("PM / wakeup: Show wakeup sources stats in sysfs") > Reported-by: Qian Cai > Cc: Qian Cai > Cc: Tri V

Re: [PATCH v3 1/2] PM / wakeup: Register wakeup class kobj after device is added

2019-08-19 Thread Tri Vo
) when the device is already registered, or > from dpm_sysfs_add() when the device is being registered with the driver > core via device_add(). > > Fixes: 986845e747af ("PM / wakeup: Show wakeup sources stats in sysfs") > Reported-by: Qian Cai > Cc: Qian Cai > Cc: Tri Vo > Signed-off-by: Stephen Boyd Reviewed-by: Tri Vo

Re: [PATCH v3 2/2] PM / wakeup: Unexport pm_wakeup_sysfs_{add,remove}()

2019-08-19 Thread Tri Vo
gt; > these functions don't need to be exported. Drop the exports. > > > > Fixes: 986845e747af ("PM / wakeup: Show wakeup sources stats in sysfs") > > Cc: Tri Vo > Messed up the address here too. Should be > > Cc: Tri Vo > > > Signed-off-by: Stephen Boyd Reviewed-by: Tri Vo

[PATCH v3] PM / wakeup: show wakeup sources stats in sysfs

2019-07-15 Thread Tri Vo
wever, debugfs doesn't have stable ABI. For this reason, create a 'struct device' to expose wakeup sources statistics in sysfs under /sys/class/wakeup//. Introduce CONFIG_PM_SLEEP_STATS that enables/disables showing wakeup source statistics in sysfs. Suggested-by: Greg Kroah-Hartman S

[PATCH v4] PM / wakeup: show wakeup sources stats in sysfs

2019-07-15 Thread Tri Vo
Signed-off-by: Tri Vo Tested-by: Tri Vo Tested-by: Kalesh Singh --- Documentation/ABI/testing/sysfs-class-wakeup | 70 + drivers/base/power/Makefile | 1 + drivers/base/power/wakeup.c | 12 +- drivers/base/power/wakeup_stat

Re: [PATCH v3] PM / wakeup: show wakeup sources stats in sysfs

2019-07-15 Thread Tri Vo
On Mon, Jul 15, 2019 at 1:37 PM Greg KH wrote: > > On Mon, Jul 15, 2019 at 01:11:16PM -0700, Tri Vo wrote: > > Userspace can use wakeup_sources debugfs node to plot history of suspend > > blocking wakeup sources over device's boot cycle. This information can > &g

Re: [PATCH v4] PM / wakeup: show wakeup sources stats in sysfs

2019-07-15 Thread Tri Vo
On Tue, Jul 16, 2019 at 11:13 AM Greg Kroah-Hartman wrote: > > On Mon, Jul 15, 2019 at 11:48:27PM +0200, Rafael J. Wysocki wrote: > > On Mon, Jul 15, 2019 at 11:44 PM Tri Vo wrote: > > > > > > Userspace can use wakeup_sources debugfs node to plot history of suspend

Re: [PATCH] PM / wakeup: Avoid dev_name collisions in wakeup class

2019-07-27 Thread Tri Vo
nclude a 'name' > > attribute in case userspace wants to figure out the type of wakeup it is > > (in the case of virtual wakeups) or the device associated with the > > wakeup. This makes it easier for userspace to go from /sys/class/wakeup > > to a place in the dev

[PATCH v3 1/3] gcov: Clang: move common GCC code into gcc_base.c

2019-01-22 Thread Tri Vo
From: Greg Hackmann base.c contains a few callbacks specific to GCC's gcov implementation. Move these into their own module in preparation for Clang support. Signed-off-by: Greg Hackmann Signed-off-by: Nick Desaulniers Signed-off-by: Tri Vo Tested-by: Trilok Soni Tested-by: Prasad Sod

[PATCH v3 2/3] gcov: Clang support

2019-01-22 Thread Tri Vo
o-authored-by: Nick Desaulniers Co-authored-by: Tri Vo Signed-off-by: Greg Hackmann Signed-off-by: Nick Desaulniers Signed-off-by: Tri Vo Tested-by: Trilok Soni Tested-by: Prasad Sodagudi Tested-by: Tri Vo Tested-by: Daniel Mentz Tested-by: Petri Gynther --- kernel/gcov/Kconfig | 3 +- k

[PATCH v3 0/3] gcov: add Clang support

2019-01-22 Thread Tri Vo
gcov: Clang support Tri Vo (1): gcov: docs: add a note on GCC vs Clang differences Documentation/dev-tools/gcov.rst | 18 +- kernel/gcov/Kconfig | 3 +- kernel/gcov/Makefile | 5 +- kernel/gcov/base.c | 84 + kernel/gcov/clang.c | 555

[PATCH v3 3/3] gcov: docs: add a note on GCC vs Clang differences

2019-01-22 Thread Tri Vo
Document some things of note to gcov users: 1. GCC gcov and Clang llvm-cov tools are not compatible. 2. The use of GCC vs Clang is transparent at build-time. Signed-off-by: Tri Vo --- Documentation/dev-tools/gcov.rst | 18 ++ 1 file changed, 14 insertions(+), 4 deletions

Re: [PATCH v2 0/4] gcov: add Clang support

2019-01-17 Thread Tri Vo
On Thu, Jan 17, 2019 at 1:30 PM Nick Desaulniers wrote: > > On Wed, Jan 16, 2019 at 7:17 AM Peter Oberparleiter > wrote: > > > > On 15.01.2019 19:36, Tri Vo wrote: > > > From: Tri Vo > > > > > > This patch series adds Clang supoprt for gcov

[PATCH 0/4] gcov: add Clang support

2019-01-14 Thread Tri Vo
gcc_base.c gcov: clang support Nick Desaulniers (1): gcov: clang: link/unlink profiling data set. Tri Vo (1): gcov: clang: pick GCC vs Clang format depending on compiler kernel/gcov/Kconfig| 9 + kernel/gcov/Makefile | 5 +- kernel/gcov/base.c | 78 +- kernel/gcov/clang.c

[PATCH 1/4] gcov: clang: move common gcc code into gcc_base.c

2019-01-14 Thread Tri Vo
From: Greg Hackmann base.c contains a few callbacks specific to GCC's gcov implementation. Move these into their own module in preparation for clang support. Signed-off-by: Greg Hackmann Signed-off-by: Nick Desaulniers Signed-off-by: Tri Vo Tested-by: Trilok Soni Tested-by: Prasad Sod

[PATCH 4/4] gcov: clang: pick GCC vs Clang format depending on compiler

2019-01-14 Thread Tri Vo
is used, Clang gcov format is selected. Signed-off-by: Tri Vo --- kernel/gcov/Kconfig | 4 1 file changed, 4 insertions(+) diff --git a/kernel/gcov/Kconfig b/kernel/gcov/Kconfig index eb428e570923..37ec551d4039 100644 --- a/kernel/gcov/Kconfig +++ b/kernel/gcov/Kconfig @@ -60,6 +60,8

[PATCH 2/4] gcov: clang support

2019-01-14 Thread Tri Vo
d-off-by: Greg Hackmann Signed-off-by: Nick Desaulniers Signed-off-by: Tri Vo Tested-by: Trilok Soni Tested-by: Prasad Sodagudi Tested-by: Tri Vo --- kernel/gcov/Kconfig | 5 + kernel/gcov/Makefile | 1 + kernel/gcov/clang.c | 531 +++ 3 files chan

[PATCH 3/4] gcov: clang: link/unlink profiling data set.

2019-01-14 Thread Tri Vo
From: Nick Desaulniers gcov.h defines an interface to access gcov_info data. Add Clang implementation of gcov_info_link/gcov_info_unlink interfaces. Signed-off-by: Nick Desaulniers Signed-off-by: Tri Vo Tested-by: Trilok Soni Tested-by: Prasad Sodagudi Tested-by: Tri Vo --- kernel/gcov

Re: [PATCH 0/4] gcov: add Clang support

2019-01-14 Thread Tri Vo
On Mon, Jan 14, 2019 at 1:33 PM Nick Desaulniers wrote: > > On Mon, Jan 14, 2019 at 1:04 PM Tri Vo wrote: > > > > This patch series adds Clang supoprt for gcov. > > > > Patch 1 refactors existing code in preparation for Clang support. Patches > > 2-3 implem

Re: [PATCH 4/4] gcov: clang: pick GCC vs Clang format depending on compiler

2019-01-15 Thread Tri Vo
On Mon, Jan 14, 2019 at 5:25 PM Masahiro Yamada wrote: > > On Tue, Jan 15, 2019 at 6:07 AM Tri Vo wrote: > > > > Clang gcov format is only supported by Clang compiler, and Clang > > compiler only supports Clang format. > > > If so, what is the point of putting GC

[PATCH v2 0/4] gcov: add Clang support

2019-01-15 Thread Tri Vo
From: Tri Vo This patch series adds Clang supoprt for gcov. Patch 1 refactors existing code in preparation for Clang support. Patches 2-3 implement necessary LLVM runtime hooks and gcov kernel interfaces. Patch 4 simplifies config selection. Greg Hackmann (2): gcov: clang: move common gcc

[PATCH v2 1/4] gcov: clang: move common gcc code into gcc_base.c

2019-01-15 Thread Tri Vo
From: Greg Hackmann base.c contains a few callbacks specific to GCC's gcov implementation. Move these into their own module in preparation for clang support. Signed-off-by: Greg Hackmann Signed-off-by: Nick Desaulniers Signed-off-by: Tri Vo Tested-by: Trilok Soni Tested-by: Prasad Sod

[PATCH v2 2/4] gcov: clang support

2019-01-15 Thread Tri Vo
d-off-by: Greg Hackmann Signed-off-by: Nick Desaulniers Signed-off-by: Tri Vo Tested-by: Trilok Soni Tested-by: Prasad Sodagudi Tested-by: Tri Vo --- kernel/gcov/Kconfig | 5 + kernel/gcov/Makefile | 1 + kernel/gcov/clang.c | 531 +++ 3 files chan

[PATCH v2 4/4] gcov: clang: pick GCC vs Clang format depending on compiler

2019-01-15 Thread Tri Vo
From: Tri Vo Clang gcov format is only supported by Clang compiler, and Clang compiler only supports Clang format. We set gcov format to depend on which compiler (GCC or Clang) is used. Automatic format detection behavior is preserved because: If GCC is used, one of the GCC gcov formats is

[PATCH v2 3/4] gcov: clang: link/unlink profiling data set.

2019-01-15 Thread Tri Vo
From: Nick Desaulniers gcov.h defines an interface to access gcov_info data. Add Clang implementation of gcov_info_link/gcov_info_unlink interfaces. Signed-off-by: Nick Desaulniers Signed-off-by: Tri Vo Tested-by: Trilok Soni Tested-by: Prasad Sodagudi Tested-by: Tri Vo --- kernel/gcov

[PATCH] ARM: disable FUNCTION_TRACER when building with Clang

2019-05-22 Thread Tri Vo
lures. However, Clang does not implement calls to "__gnu_mcount_nc" correctly. It does not save the link register on the stack, which corrupts the stack. The resulting kernel does not boot. Disable FUNCTION_TRACER support when building with Clang. Link: https://github.com/ClangBuiltLinux/li

[PATCH] module: add stub for within_module

2019-04-06 Thread Tri Vo
55384681109231&w=2 Signed-off-by: Tri Vo --- include/linux/module.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/module.h b/include/linux/module.h index 5bf5dcd91009..47190ebb70bf 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -709,6 +709,11 @@

Re: [PATCH v2] gcov: fix when CONFIG_MODULES is not set

2019-03-30 Thread Tri Vo
On Fri, Mar 29, 2019 at 1:53 PM Randy Dunlap wrote: > > On 3/29/19 11:18 AM, Nick Desaulniers wrote: > > Fixes commit 8c3d220cb6b5 ("gcov: clang support") > > There is a certain format for Fixes: and that's not quite it. :( > > > Cc: Greg Hackmann &

Re: "PM / wakeup: Show wakeup sources stats in sysfs" causes boot warnings

2019-08-13 Thread Tri Vo
On Tue, Aug 13, 2019 at 3:35 PM Stephen Boyd wrote: > > Quoting Qian Cai (2019-08-13 14:32:56) > > The linux-next commit "PM / wakeup: Show wakeup sources stats in sysfs" [1] > > introduced some baddies during boot on several x86 servers. Reverted the > > commit > > fixed the issue. > > > > [1] h

Re: [PATCH v5] PM / wakeup: show wakeup sources stats in sysfs

2019-07-31 Thread Tri Vo
On Wed, Jul 31, 2019 at 2:19 PM Rafael J. Wysocki wrote: > > On Wed, Jul 31, 2019 at 7:14 PM Stephen Boyd wrote: > > > > Quoting Rafael J. Wysocki (2019-07-31 04:58:36) > > > On Wednesday, July 31, 2019 10:34:11 AM CEST Rafael J. Wysocki wrote: > > > > On Wed, Jul 31, 2019 at 1:41 AM Stephen Boyd

[PATCH v6] PM / wakeup: show wakeup sources stats in sysfs

2019-07-31 Thread Tri Vo
Signed-off-by: Tri Vo Tested-by: Tri Vo Tested-by: Kalesh Singh --- Documentation/ABI/testing/sysfs-class-wakeup | 76 + drivers/acpi/device_pm.c | 3 +- drivers/base/power/Makefile | 2 +- drivers/base/power/wakeup.c | 18 +-

Re: [PATCH v6] PM / wakeup: show wakeup sources stats in sysfs

2019-07-31 Thread Tri Vo
On Wed, Jul 31, 2019 at 2:59 PM Stephen Boyd wrote: > > Quoting Tri Vo (2019-07-31 14:55:14) > > +/** > > + * wakeup_source_sysfs_add - Add wakeup_source attributes to sysfs. > > + * @parent: Device given wakeup source is associated with (or NULL if > > virtual). &g

Re: [PATCH v6] PM / wakeup: show wakeup sources stats in sysfs

2019-07-31 Thread Tri Vo
On Wed, Jul 31, 2019 at 3:17 PM Rafael J. Wysocki wrote: > > On Wednesday, July 31, 2019 11:59:32 PM CEST Stephen Boyd wrote: > > Quoting Tri Vo (2019-07-31 14:55:14) > > > +/** > > > + * wakeup_source_sysfs_add - Add wakeup_source attributes to sysfs. > >

Re: [PATCH v6] PM / wakeup: show wakeup sources stats in sysfs

2019-07-31 Thread Tri Vo
On Wed, Jul 31, 2019 at 3:42 PM Rafael J. Wysocki wrote: > > On Thursday, August 1, 2019 12:31:16 AM CEST Tri Vo wrote: > > On Wed, Jul 31, 2019 at 3:17 PM Rafael J. Wysocki > > wrote: > > > > > > On Wednesday, July 31, 2019 11:59:32 PM CEST Stephen Boyd wr

Re: [PATCH v6] PM / wakeup: show wakeup sources stats in sysfs

2019-07-31 Thread Tri Vo
On Wed, Jul 31, 2019 at 4:10 PM Rafael J. Wysocki wrote: > > On Thu, Aug 1, 2019 at 12:59 AM Tri Vo wrote: > > > > On Wed, Jul 31, 2019 at 3:42 PM Rafael J. Wysocki > > wrote: > > > > > > On Thursday, August 1, 2019 12:31:16 AM CEST Tri Vo wrote: >

Re: [PATCH v6] PM / wakeup: show wakeup sources stats in sysfs

2019-08-01 Thread Tri Vo
On Wed, Jul 31, 2019 at 4:45 PM Stephen Boyd wrote: > > Quoting Rafael J. Wysocki (2019-07-31 16:10:38) > > On Thu, Aug 1, 2019 at 12:59 AM Tri Vo wrote: > > > > > > On Wed, Jul 31, 2019 at 3:42 PM Rafael J. Wysocki > > > wrote: > &g

Re: [PATCH v6] PM / wakeup: show wakeup sources stats in sysfs

2019-08-01 Thread Tri Vo
On Thu, Aug 1, 2019 at 1:23 PM Stephen Boyd wrote: > > Quoting Tri Vo (2019-08-01 12:50:25) > > On Wed, Jul 31, 2019 at 4:45 PM Stephen Boyd wrote: > > > > > > Quoting Rafael J. Wysocki (2019-07-31 16:10:38) > > > > On

Re: [PATCH v6] PM / wakeup: show wakeup sources stats in sysfs

2019-08-01 Thread Tri Vo
On Thu, Aug 1, 2019 at 3:11 PM Stephen Boyd wrote: > > Quoting Tri Vo (2019-08-01 14:44:52) > > On Thu, Aug 1, 2019 at 1:23 PM Stephen Boyd wrote: > > > > > > > > > I don't find it awkward or difficult. Just know what the name of the > > >

Re: [PATCH v6] PM / wakeup: show wakeup sources stats in sysfs

2019-08-03 Thread Tri Vo
On Thu, Aug 1, 2019 at 3:10 PM Rafael J. Wysocki wrote: > > On Thu, Aug 1, 2019 at 11:45 PM Tri Vo wrote: > > > > On Thu, Aug 1, 2019 at 1:23 PM Stephen Boyd wrote: > > > > > > Quoting Tri Vo (2019-08-01 12:50:25) > > > > On Wed, Jul

[PATCH v7 0/3] PM / wakeup: show wakeup sources stats in sysfs

2019-08-05 Thread Tri Vo
wever, debugfs doesn't have stable ABI. For this reason, create a 'struct device' to expose wakeup sources statistics in sysfs under /sys/class/wakeup/wakeup/*. Patch 1 and 2 do some cleanup to simplify our changes to how wakeup sources are created. Patch 3 implements wakeup sources sta

[PATCH v7 2/3] PM / wakeup: Use wakeup_source_register() in wakelock.c

2019-08-05 Thread Tri Vo
path. Signed-off-by: Tri Vo --- kernel/power/wakelock.c | 32 +++- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/kernel/power/wakelock.c b/kernel/power/wakelock.c index 4210152e56f0..d1eb7fd98b64 100644 --- a/kernel/power/wakelock.c +++ b/kernel/

[PATCH v7 3/3] PM / wakeup: Show wakeup sources stats in sysfs

2019-08-05 Thread Tri Vo
ned-off-by: Tri Vo Tested-by: Tri Vo Tested-by: Kalesh Singh --- Documentation/ABI/testing/sysfs-class-wakeup | 76 + drivers/acpi/device_pm.c | 3 +- drivers/base/power/Makefile | 2 +- drivers/base/power/power.h | 9 ++ dr

[PATCH v7 1/3] PM / wakeup: Drop wakeup_source_init(), wakeup_source_prepare()

2019-08-05 Thread Tri Vo
wakeup_source_init() has no users. Remove it. As a result, wakeup_source_prepare() is only called from wakeup_source_create(). Merge wakeup_source_prepare() into wakeup_source_create() and remove it. Signed-off-by: Tri Vo --- drivers/base/power/wakeup.c | 33

Re: [PATCH v2] PM/sleep: Expose suspend stats in sysfs

2019-08-05 Thread Tri Vo
s per Greg > > > - Updated ABI Documentation > > > > This is nice, I didn't even know some of these were in the debugfs > > entries, so this should be more helpful to people. > > > > Reviewed-by: Greg Kroah-Hartman Reviewed-by: Tri Vo

Re: [PATCH v7 1/3] PM / wakeup: Drop wakeup_source_init(), wakeup_source_prepare()

2019-08-05 Thread Tri Vo
On Mon, Aug 5, 2019 at 1:54 PM Stephen Boyd wrote: > > Quoting Tri Vo (2019-08-05 10:58:46) > > diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c > > index ee31d4f8d856..3938892c8903 100644 > > --- a/drivers/base/power/wakeup.c > > +++

[PATCH v5] PM / wakeup: show wakeup sources stats in sysfs

2019-07-29 Thread Tri Vo
Boyd Signed-off-by: Tri Vo Tested-by: Tri Vo Tested-by: Kalesh Singh Reported-by: kbuild test robot --- Documentation/ABI/testing/sysfs-class-wakeup | 76 + drivers/acpi/device_pm.c | 3 +- drivers/base/power/Makefile | 2 +- drivers

Re: [PATCH v5] PM / wakeup: show wakeup sources stats in sysfs

2019-07-30 Thread Tri Vo
On Mon, Jul 29, 2019 at 10:46 PM Rafael J. Wysocki wrote: > > On Tue, Jul 30, 2019 at 4:45 AM Tri Vo wrote: > > > > Userspace can use wakeup_sources debugfs node to plot history of suspend > > blocking wakeup sources over device's boot cycle. This information can &

Re: [PATCH v5] PM / wakeup: show wakeup sources stats in sysfs

2019-07-30 Thread Tri Vo
On Mon, Jul 29, 2019 at 11:47 PM Greg KH wrote: > > On Mon, Jul 29, 2019 at 07:43:09PM -0700, Tri Vo wrote: > > Userspace can use wakeup_sources debugfs node to plot history of suspend > > blocking wakeup sources over device's boot cycle. This information can > &g

Re: [PATCH v5] PM / wakeup: show wakeup sources stats in sysfs

2019-07-30 Thread Tri Vo
On Tue, Jul 30, 2019 at 4:06 PM Rafael J. Wysocki wrote: > > On Wed, Jul 31, 2019 at 12:26 AM Stephen Boyd wrote: > > > > Quoting Rafael J. Wysocki (2019-07-30 15:17:55) > > > On Tuesday, July 30, 2019 8:48:09 PM CEST Stephen Boyd wrote: > > > > Quoting Tr

Re: [PATCH v7 3/3] PM / wakeup: Show wakeup sources stats in sysfs

2019-08-06 Thread Tri Vo
On Mon, Aug 5, 2019 at 4:29 PM Stephen Boyd wrote: > > Quoting Tri Vo (2019-08-05 10:58:48) > > diff --git a/drivers/base/power/wakeup_stats.c > > b/drivers/base/power/wakeup_stats.c > > new file mode 100644 > > index ..3a4f55028e27 > > --- /d

[PATCH v8 1/3] PM / wakeup: Drop wakeup_source_init(), wakeup_source_prepare()

2019-08-06 Thread Tri Vo
ws an error. Signed-off-by: Tri Vo --- drivers/base/power/wakeup.c | 33 + include/linux/pm_wakeup.h | 11 --- 2 files changed, 13 insertions(+), 31 deletions(-) diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index ee31d4f

[PATCH v8 3/3] PM / wakeup: Show wakeup sources stats in sysfs

2019-08-06 Thread Tri Vo
ned-off-by: Tri Vo Tested-by: Tri Vo Tested-by: Kalesh Singh --- Documentation/ABI/testing/sysfs-class-wakeup | 76 +++ drivers/acpi/device_pm.c | 3 +- drivers/base/power/Makefile | 2 +- drivers/base/power/power.h | 9 + drivers/

[PATCH v8 2/3] PM / wakeup: Use wakeup_source_register() in wakelock.c

2019-08-06 Thread Tri Vo
path. Signed-off-by: Tri Vo Reviewed-by: Stephen Boyd --- kernel/power/wakelock.c | 32 +++- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/kernel/power/wakelock.c b/kernel/power/wakelock.c index 4210152e56f0..d1eb7fd98b64 100644 --- a/kernel/

[PATCH v8 0/3] PM / wakeup: Show wakeup sources stats in sysfs

2019-08-06 Thread Tri Vo
wever, debugfs doesn't have stable ABI. For this reason, create a 'struct device' to expose wakeup sources statistics in sysfs under /sys/class/wakeup/wakeup/*. Patch 1 and 2 do some cleanup to simplify our changes to how wakeup sources are created. Patch 3 implements wakeup sources sta

Re: Alternatives to /sys/kernel/debug/wakeup_sources

2019-06-23 Thread Tri Vo
On Wed, Jun 19, 2019 at 1:35 AM Rafael J. Wysocki wrote: > > On Wed, Jun 19, 2019 at 1:52 AM Joel Fernandes wrote: > > > > On Tue, Jun 18, 2019 at 7:15 PM Tri Vo wrote: > > [snip] > > > > > > > > > > > > > > Android userspace re

Re: Alternatives to /sys/kernel/debug/wakeup_sources

2019-06-24 Thread Tri Vo
On Mon, Jun 24, 2019 at 2:55 PM Rafael J. Wysocki wrote: > > On Mon, Jun 24, 2019 at 2:27 PM Joel Fernandes wrote: > > > > On Mon, Jun 24, 2019 at 3:37 AM Greg Kroah-Hartman > > wrote: > > > > > > On Sun, Jun 23, 2019 at 06:48:43PM -0700, Tri Vo wrot

Re: Alternatives to /sys/kernel/debug/wakeup_sources

2019-06-18 Thread Tri Vo
On Tue, Jun 18, 2019 at 2:23 PM Rafael J. Wysocki wrote: > > On Tuesday, June 18, 2019 10:17:16 PM CEST Sandeep Patil wrote: > > > > Hi Rafael, Viresh etc. > > > > On Tue, Jun 11, 2019 at 10:31:16AM -0700, Tri Vo wrote: > > > On Tue, Jun 4, 2019 at 5:23

[PATCH] PM / wakeup: show wakeup sources stats in sysfs

2019-06-25 Thread Tri Vo
kfree to kobject_put(). Signed-off-by: Tri Vo --- drivers/base/power/Makefile | 2 +- drivers/base/power/wakeup.c | 13 +- drivers/base/power/wakeup_sysfs.c | 204 ++ include/linux/pm_wakeup.h | 9 ++ kernel/power/wakelock.c | 13 +-

Re: [PATCH] PM / wakeup: show wakeup sources stats in sysfs

2019-06-25 Thread Tri Vo
On Tue, Jun 25, 2019 at 5:55 PM Tri Vo wrote: > > Userspace can use wakeup_sources debugfs node to plot history of suspend > blocking wakeup sources over device's boot cycle. This information can > then be used (1) for power-specific bug reporting and (2) towards > attributing

Re: [PATCH] PM / wakeup: show wakeup sources stats in sysfs

2019-06-25 Thread Tri Vo
On Tue, Jun 25, 2019 at 6:12 PM Greg KH wrote: > > On Tue, Jun 25, 2019 at 05:54:49PM -0700, Tri Vo wrote: > > Userspace can use wakeup_sources debugfs node to plot history of suspend > > blocking wakeup sources over device's boot cycle. This information can > &g

Re: [PATCH] PM / wakeup: show wakeup sources stats in sysfs

2019-06-26 Thread Tri Vo
On Tue, Jun 25, 2019 at 6:48 PM Greg KH wrote: > > On Tue, Jun 25, 2019 at 06:33:08PM -0700, Tri Vo wrote: > > On Tue, Jun 25, 2019 at 6:12 PM Greg KH wrote: > > > > +static ssize_t wakeup_source_count_show(struct wakeup_source *ws, > > > > +

Re: [PATCH] PM / wakeup: show wakeup sources stats in sysfs

2019-06-26 Thread Tri Vo
On Tue, Jun 25, 2019 at 6:33 PM Tri Vo wrote: > > On Tue, Jun 25, 2019 at 6:12 PM Greg KH wrote: > > > > On Tue, Jun 25, 2019 at 05:54:49PM -0700, Tri Vo wrote: > > > Embedding a struct kobject into struct wakeup_source changes lifetime > > > requirement

[PATCH v2] PM / wakeup: show wakeup sources stats in sysfs

2019-06-27 Thread Tri Vo
g kfree to kobject_put(). Change struct wakelock's wakeup_source member to a pointer to decouple lifetimes of struct wakelock and struct wakeup_source for above reason. Introduce CONFIG_PM_SLEEP_STATS that enables/disables showing wakeup source statistics in sysfs. Signed-off-by: Tri Vo --- Do

Re: [PATCH] PM / wakeup: show wakeup sources stats in sysfs

2019-06-27 Thread Tri Vo
On Wed, Jun 26, 2019 at 5:04 PM Greg KH wrote: > > On Wed, Jun 26, 2019 at 03:48:58PM -0700, Tri Vo wrote: > > On Tue, Jun 25, 2019 at 6:33 PM Tri Vo wrote: > > > > > > On Tue, Jun 25, 2019 at 6:12 PM Greg KH > > > wrote: > > > > > > &

Re: [PATCH v2] PM / wakeup: show wakeup sources stats in sysfs

2019-07-07 Thread Tri Vo
On Thu, Jul 4, 2019 at 7:31 PM Rafael J. Wysocki wrote: > > On Friday, June 28, 2019 5:10:40 PM CEST Greg KH wrote: > > On Thu, Jun 27, 2019 at 03:53:35PM -0700, Tri Vo wrote: > > > Userspace can use wakeup_sources debugfs node to plot history of suspend > > >

Re: [PATCH v3 0/3] gcov: add Clang support

2019-03-11 Thread Tri Vo
On Tue, Mar 5, 2019 at 6:29 AM Peter Oberparleiter wrote: > > On 23.01.2019 00:37, Tri Vo wrote: > > This patch series adds Clang supoprt for gcov. > > > > Patch 1 refactors existing code in preparation for Clang support. > > Patch 2 implements necessary LLVM

[PATCH v2] x86_64: Add "-m elf_i386" when linking i386 object files.

2019-01-11 Thread Tri Vo
d by building x86_64 kernel with GNU gcc/ld toolchain and booting it in QEMU. Suggested-by: Dmitry Golovin Signed-off-by: Georgii Rymar Signed-off-by: Tri Vo Tested-by: Tri Vo --- arch/x86/boot/Makefile| 2 +- arch/x86/realmode/rm/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deleti

[PATCH v3] x86_64: Add "-m elf_i386" when linking i386 object files.

2019-01-11 Thread Tri Vo
d by building x86_64 kernel with GNU gcc/ld toolchain and booting it in QEMU. Suggested-by: Dmitry Golovin Signed-off-by: George Rimar Signed-off-by: Tri Vo Tested-by: Tri Vo Tested-by: Nick Desaulniers --- v2: updated commit message to clarify that ld documentation is ambiguous w.r.t -m vs OU

Re: Regression with PM / wakeup: Show wakeup sources stats in sysfs"

2020-05-29 Thread Tri Vo
On Fri, May 29, 2020 at 9:51 AM Rafael J. Wysocki wrote: > > On 5/28/2020 10:46 PM, Florian Fainelli wrote: > > Hi, > > > > Commit c8377adfa78103be5380200eb9dab764d7ca890e ("PM / wakeup: Show > > wakeup sources stats in sysfs") is causing some of our tests to fail > > because /sys/class/net/*/devi

Re: Regression with PM / wakeup: Show wakeup sources stats in sysfs"

2020-05-29 Thread Tri Vo
On Fri, May 29, 2020 at 3:37 PM Florian Fainelli wrote: > > On 5/29/20 3:28 PM, Tri Vo wrote: > > On Fri, May 29, 2020 at 9:51 AM Rafael J. Wysocki > > wrote: > >> > >> On 5/28/2020 10:46 PM, Florian Fainelli wrote: > >>> Hi, > >>>

Re: Alternatives to /sys/kernel/debug/wakeup_sources

2019-06-19 Thread Tri Vo
On Wed, Jun 19, 2019 at 11:01 AM Joel Fernandes wrote: > > On Wed, Jun 19, 2019 at 1:07 PM Greg Kroah-Hartman > wrote: > > > > On Wed, Jun 19, 2019 at 12:53:12PM -0400, Joel Fernandes wrote: > > > > It is conceivable to have a "wakeup_sources" directory under > > > > /sys/power/ and sysfs nodes f

[PATCH v2] module: add stubs for within_module functions

2019-04-15 Thread Tri Vo
: Randy Dunlap Reported-by: kbuild test robot Link: https://marc.info/?l=linux-mm&m=155384681109231&w=2 Signed-off-by: Tri Vo --- include/linux/module.h | 17 + 1 file changed, 17 insertions(+) diff --git a/include/linux/module.h b/include/linux/module.h index 5bf5