* [PATCH 0/2] x86/mm/pat: don't use WARN for nopat requirement
@ 2015-06-22 22:31 Luis R. Rodriguez
[not found] ` <1435012318-381-1-git-send-email-mcgrof-3uybbJdB1yH774rrrx3eTA@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Luis R. Rodriguez @ 2015-06-22 22:31 UTC (permalink / raw)
To: bp-l3A5Bk7waGM, mchehab-JPH+aEBZ4P+UEJcrhfAQsw,
dledford-H+wXaHxf7aLQT0dZR+AlfA
Cc: mingo-DgEjT+Ai2ygdnm+yROfE0A, fengguang.wu-ral2JQCrhuEAvxtiuMwx3w,
linux-media-u79uwXL29TY76Z2rM5mHXA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Luis R. Rodriguez
From: "Luis R. Rodriguez" <mcgrof-IBi9RG/b67k@public.gmane.org>
Mauro, Doug,
The 0-day robot found using WARN() on built-in kernels confusing. Upon
further thought pr_warn() is better and will likely also not confuse
humans too.
Boris, provided maintainers Ack, please consider these patches.
These depend on pat_enabled() exported symbol which went in through
the x86 tree, so I suppose this also needs to go through there. This
is an example issue of cross-tree collateral evolution follow ups,
one reason why I punted the a RFD and proposal for a linux-oven [0].
In that regard I suppose follow ups like these would need to go through
that tree as well.
[0] http://lkml.kernel.org/r/20150619231255.GC7487-dAjH6bxAqesAS62YNPtMr3dQhYtBYE6JAL8bYrjMMd8@public.gmane.org
Luis R. Rodriguez (2):
x86/mm/pat, drivers/infiniband/ipath: replace WARN() with pr_warn()
x86/mm/pat, drivers/media/ivtv: replace WARN() with pr_warn()
drivers/infiniband/hw/ipath/ipath_driver.c | 6 ++++--
drivers/media/pci/ivtv/ivtvfb.c | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
--
2.3.2.209.gd67f9d5.dirty
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
^ permalink raw reply [flat|nested] 6+ messages in thread[parent not found: <1435012318-381-1-git-send-email-mcgrof-3uybbJdB1yH774rrrx3eTA@public.gmane.org>]
* [PATCH 1/2] x86/mm/pat, drivers/infiniband/ipath: replace WARN() with pr_warn() [not found] ` <1435012318-381-1-git-send-email-mcgrof-3uybbJdB1yH774rrrx3eTA@public.gmane.org> @ 2015-06-22 22:31 ` Luis R. Rodriguez 2015-06-23 7:39 ` Ingo Molnar 2015-06-22 22:31 ` [PATCH 2/2] x86/mm/pat, drivers/media/ivtv: " Luis R. Rodriguez 1 sibling, 1 reply; 6+ messages in thread From: Luis R. Rodriguez @ 2015-06-22 22:31 UTC (permalink / raw) To: bp-l3A5Bk7waGM, mchehab-JPH+aEBZ4P+UEJcrhfAQsw, dledford-H+wXaHxf7aLQT0dZR+AlfA Cc: mingo-DgEjT+Ai2ygdnm+yROfE0A, fengguang.wu-ral2JQCrhuEAvxtiuMwx3w, linux-media-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Luis R. Rodriguez From: "Luis R. Rodriguez" <mcgrof-IBi9RG/b67k@public.gmane.org> On built-in kernels this will always splat. Fix that. Reported-by: Fengguang Wu <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> [0-day test robot] Signed-off-by: Luis R. Rodriguez <mcgrof-IBi9RG/b67k@public.gmane.org> --- drivers/infiniband/hw/ipath/ipath_driver.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c index 2d7e503..871dbe5 100644 --- a/drivers/infiniband/hw/ipath/ipath_driver.c +++ b/drivers/infiniband/hw/ipath/ipath_driver.c @@ -31,6 +31,8 @@ * SOFTWARE. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/sched.h> #include <linux/spinlock.h> #include <linux/idr.h> @@ -399,8 +401,8 @@ static int ipath_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) u32 bar0 = 0, bar1 = 0; #ifdef CONFIG_X86_64 - if (WARN(pat_enabled(), - "ipath needs PAT disabled, boot with nopat kernel parameter\n")) { + if (pat_enabled()) { + pr_warn("ipath needs PAT disabled, boot with nopat kernel parameter\n"); ret = -ENODEV; goto bail; } -- 2.3.2.209.gd67f9d5.dirty -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] x86/mm/pat, drivers/infiniband/ipath: replace WARN() with pr_warn() 2015-06-22 22:31 ` [PATCH 1/2] x86/mm/pat, drivers/infiniband/ipath: replace WARN() with pr_warn() Luis R. Rodriguez @ 2015-06-23 7:39 ` Ingo Molnar [not found] ` <20150623073959.GC21872-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Ingo Molnar @ 2015-06-23 7:39 UTC (permalink / raw) To: Luis R. Rodriguez Cc: bp, mchehab, dledford, fengguang.wu, linux-media, linux-rdma, linux-kernel, Luis R. Rodriguez * Luis R. Rodriguez <mcgrof@do-not-panic.com> wrote: > From: "Luis R. Rodriguez" <mcgrof@suse.com> > > On built-in kernels this will always splat. Fix that. > > Reported-by: Fengguang Wu <fengguang.wu@intel.com> [0-day test robot] > Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com> > --- > drivers/infiniband/hw/ipath/ipath_driver.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c > index 2d7e503..871dbe5 100644 > --- a/drivers/infiniband/hw/ipath/ipath_driver.c > +++ b/drivers/infiniband/hw/ipath/ipath_driver.c > @@ -31,6 +31,8 @@ > * SOFTWARE. > */ > > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > + > #include <linux/sched.h> > #include <linux/spinlock.h> > #include <linux/idr.h> > @@ -399,8 +401,8 @@ static int ipath_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) > u32 bar0 = 0, bar1 = 0; > > #ifdef CONFIG_X86_64 > - if (WARN(pat_enabled(), > - "ipath needs PAT disabled, boot with nopat kernel parameter\n")) { > + if (pat_enabled()) { > + pr_warn("ipath needs PAT disabled, boot with nopat kernel parameter\n"); > ret = -ENODEV; > goto bail; > } Same observation as for the other patch: please only warn if the hardware is present and the driver tries to activate. No need to annoy others. Thanks, Ingo ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <20150623073959.GC21872-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH 1/2] x86/mm/pat, drivers/infiniband/ipath: replace WARN() with pr_warn() [not found] ` <20150623073959.GC21872-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2015-06-23 8:57 ` Luis R. Rodriguez 0 siblings, 0 replies; 6+ messages in thread From: Luis R. Rodriguez @ 2015-06-23 8:57 UTC (permalink / raw) To: Ingo Molnar Cc: Borislav Petkov, Mauro Carvalho Chehab, Doug Ledford, Fengguang Wu, linux-media-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Tue, Jun 23, 2015 at 12:39 AM, Ingo Molnar <mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote: > Same observation as for the other patch: please only warn if the hardware is > present and the driver tries to activate. No need to annoy others. Will fix, and respin. Luis -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] x86/mm/pat, drivers/media/ivtv: replace WARN() with pr_warn() [not found] ` <1435012318-381-1-git-send-email-mcgrof-3uybbJdB1yH774rrrx3eTA@public.gmane.org> 2015-06-22 22:31 ` [PATCH 1/2] x86/mm/pat, drivers/infiniband/ipath: replace WARN() with pr_warn() Luis R. Rodriguez @ 2015-06-22 22:31 ` Luis R. Rodriguez [not found] ` <1435012318-381-3-git-send-email-mcgrof-3uybbJdB1yH774rrrx3eTA@public.gmane.org> 1 sibling, 1 reply; 6+ messages in thread From: Luis R. Rodriguez @ 2015-06-22 22:31 UTC (permalink / raw) To: bp-l3A5Bk7waGM, mchehab-JPH+aEBZ4P+UEJcrhfAQsw, dledford-H+wXaHxf7aLQT0dZR+AlfA Cc: mingo-DgEjT+Ai2ygdnm+yROfE0A, fengguang.wu-ral2JQCrhuEAvxtiuMwx3w, linux-media-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Luis R. Rodriguez From: "Luis R. Rodriguez" <mcgrof-IBi9RG/b67k@public.gmane.org> On built-in kernels this will always splat. Fix that. Reported-by: Fengguang Wu <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> [0-day test robot] Signed-off-by: Luis R. Rodriguez <mcgrof-IBi9RG/b67k@public.gmane.org> --- drivers/media/pci/ivtv/ivtvfb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/media/pci/ivtv/ivtvfb.c b/drivers/media/pci/ivtv/ivtvfb.c index 4cb365d..6f0c364 100644 --- a/drivers/media/pci/ivtv/ivtvfb.c +++ b/drivers/media/pci/ivtv/ivtvfb.c @@ -38,6 +38,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/module.h> #include <linux/kernel.h> #include <linux/fb.h> @@ -1266,8 +1268,8 @@ static int __init ivtvfb_init(void) int err; #ifdef CONFIG_X86_64 - if (WARN(pat_enabled(), - "ivtvfb needs PAT disabled, boot with nopat kernel parameter\n")) { + if (pat_enabled()) { + pr_warn("ivtvfb needs PAT disabled, boot with nopat kernel parameter\n"); return -ENODEV; } #endif -- 2.3.2.209.gd67f9d5.dirty -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in ^ permalink raw reply related [flat|nested] 6+ messages in thread
[parent not found: <1435012318-381-3-git-send-email-mcgrof-3uybbJdB1yH774rrrx3eTA@public.gmane.org>]
* Re: [PATCH 2/2] x86/mm/pat, drivers/media/ivtv: replace WARN() with pr_warn() [not found] ` <1435012318-381-3-git-send-email-mcgrof-3uybbJdB1yH774rrrx3eTA@public.gmane.org> @ 2015-06-23 7:39 ` Ingo Molnar 0 siblings, 0 replies; 6+ messages in thread From: Ingo Molnar @ 2015-06-23 7:39 UTC (permalink / raw) To: Luis R. Rodriguez Cc: bp-l3A5Bk7waGM, mchehab-JPH+aEBZ4P+UEJcrhfAQsw, dledford-H+wXaHxf7aLQT0dZR+AlfA, fengguang.wu-ral2JQCrhuEAvxtiuMwx3w, linux-media-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Luis R. Rodriguez * Luis R. Rodriguez <mcgrof-3uybbJdB1yH774rrrx3eTA@public.gmane.org> wrote: > From: "Luis R. Rodriguez" <mcgrof-IBi9RG/b67k@public.gmane.org> > > On built-in kernels this will always splat. Fix that. > > Reported-by: Fengguang Wu <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> [0-day test robot] > Signed-off-by: Luis R. Rodriguez <mcgrof-IBi9RG/b67k@public.gmane.org> > --- > drivers/media/pci/ivtv/ivtvfb.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/media/pci/ivtv/ivtvfb.c b/drivers/media/pci/ivtv/ivtvfb.c > index 4cb365d..6f0c364 100644 > --- a/drivers/media/pci/ivtv/ivtvfb.c > +++ b/drivers/media/pci/ivtv/ivtvfb.c > @@ -38,6 +38,8 @@ > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ > > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > + > #include <linux/module.h> > #include <linux/kernel.h> > #include <linux/fb.h> > @@ -1266,8 +1268,8 @@ static int __init ivtvfb_init(void) > int err; > > #ifdef CONFIG_X86_64 > - if (WARN(pat_enabled(), > - "ivtvfb needs PAT disabled, boot with nopat kernel parameter\n")) { > + if (pat_enabled()) { > + pr_warn("ivtvfb needs PAT disabled, boot with nopat kernel parameter\n"); > return -ENODEV; > } So why should a built-in kernel bzImage with this driver enabled but the driver not present print this warning? Why not only print in a code path where we know the hardware is present? allyesconfig bootups are noisy enough as-is ... Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-06-23 8:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-22 22:31 [PATCH 0/2] x86/mm/pat: don't use WARN for nopat requirement Luis R. Rodriguez
[not found] ` <1435012318-381-1-git-send-email-mcgrof-3uybbJdB1yH774rrrx3eTA@public.gmane.org>
2015-06-22 22:31 ` [PATCH 1/2] x86/mm/pat, drivers/infiniband/ipath: replace WARN() with pr_warn() Luis R. Rodriguez
2015-06-23 7:39 ` Ingo Molnar
[not found] ` <20150623073959.GC21872-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-06-23 8:57 ` Luis R. Rodriguez
2015-06-22 22:31 ` [PATCH 2/2] x86/mm/pat, drivers/media/ivtv: " Luis R. Rodriguez
[not found] ` <1435012318-381-3-git-send-email-mcgrof-3uybbJdB1yH774rrrx3eTA@public.gmane.org>
2015-06-23 7:39 ` Ingo Molnar
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox