x86/mm/pat: don't use WARN for nopat requirement
Subsystems (3)
cover x86/mm/pat: don't use WARN for nopat requirement
From: "Luis R. Rodriguez" <mcgrof-IBi9RG/[email protected]>
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.
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(-)
Signature · 4 lines
2.3.2.209.gd67f9d5.dirty -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
PATCH 1/2 x86/mm/pat, drivers/infiniband/ipath: replace WARN() with pr_warn()
From: "Luis R. Rodriguez" <mcgrof-IBi9RG/[email protected]>
On built-in kernels this will always splat. Fix that.
--- drivers/infiniband/hw/ipath/ipath_driver.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/infiniband/hw/ipath/ipath_driver.c +4 -2
@@ -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; }
Signature · 4 lines
2.3.2.209.gd67f9d5.dirty -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
Re: [PATCH 1/2] x86/mm/pat, drivers/infiniband/ipath: replace WARN() with pr_warn()
Quoted 24 lines · Luis R. Rodriguez
From: "Luis R. Rodriguez" <[email protected]>
On built-in kernels this will always splat. Fix that.
Signed-off-by Luis R. Rodriguez <[email protected]>--- drivers/infiniband/hw/ipath/ipath_driver.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/infiniband/hw/ipath/ipath_driver.c +2
-0@@ -31,6 +31,8 @@* SOFTWARE. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/sched.h> #include <linux/spinlock.h> #include <linux/idr.h>
drivers/infiniband/hw/ipath/ipath_driver.c static int ipath_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) · line 408
Quoted 10 lines
drivers/infiniband/hw/ipath/ipath_driver.c +2
-2@@ -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
Re: [PATCH 1/2] x86/mm/pat, drivers/infiniband/ipath: replace WARN() with pr_warn()
Quoted 2 lines · Ingo Molnar
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/2 x86/mm/pat, drivers/media/ivtv: replace WARN() with pr_warn()
In reply to Luis R. RodriguezFrom: "Luis R. Rodriguez" <mcgrof-IBi9RG/[email protected]>
On built-in kernels this will always splat. Fix that.
--- drivers/media/pci/ivtv/ivtvfb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/media/pci/ivtv/ivtvfb.c +4 -2
@@ -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
Signature · 4 lines
2.3.2.209.gd67f9d5.dirty -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
Re: [PATCH 2/2] x86/mm/pat, drivers/media/ivtv: replace WARN() with pr_warn()
Quoted 24 lines · Luis R. Rodriguez
From: "Luis R. Rodriguez" <mcgrof-IBi9RG/[email protected]>
On built-in kernels this will always splat. Fix that.
Signed-off-by Luis R. Rodriguez <mcgrof-IBi9RG/[email protected]>--- drivers/media/pci/ivtv/ivtvfb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/media/pci/ivtv/ivtvfb.c +2
-0@@ -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>
drivers/media/pci/ivtv/ivtvfb.c static int __init ivtvfb_init(void) · line 1274
Quoted 9 lines
drivers/media/pci/ivtv/ivtvfb.c +2
-2@@ -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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html