From mboxrd@z Thu Jan 1 00:00:00 1970 From: sukanya.c@vvdntech.in (Sukanya Ch) Date: Wed, 19 Oct 2016 11:03:41 +0530 Subject: Kernelnewbies Digest, Vol 71, Issue 22 In-Reply-To: References: Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi Wenda Ni, Please go through the following link to enable debugging output.Seems you have missed enabling DEBUG in Makefile. Hope it will help you. https://www.kernel.org/doc/local/pr_debug.txt *CFLAGS_[filename].o := -DDEBUG* *With Best Regards,* Sukanya Ch Software Engineer VVDN Technologies Pvt Ltd *Cell : *+91 9551955031 | *Skype :* sukanya.chinthamreddy On Tue, Oct 18, 2016 at 7:44 PM, wrote: > Send Kernelnewbies mailing list submissions to > kernelnewbies at kernelnewbies.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > or, via email, send a message with subject or body 'help' to > kernelnewbies-request at kernelnewbies.org > > You can reach the person managing the list at > kernelnewbies-owner at kernelnewbies.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Kernelnewbies digest..." > > > Today's Topics: > > 1. kernel loglevel (Wenda Ni) > 2. Re: kernel loglevel (Wenda Ni) > 3. Re: kernel loglevel (Joel Fernandes) > 4. Re: kernel loglevel (Thibaut SAUTEREAU) > 5. Re: kernel loglevel (Wenda Ni) > 6. Fw: TPS65910 Regulator Isuue (Amit Mahadik) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 17 Oct 2016 19:17:32 -0400 > From: Wenda Ni > Subject: kernel loglevel > To: kernelnewbies at kernelnewbies.org > Message-ID: > mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > Dear all, > > I am working on a kernel module that incorporate both pr_debug and > pr_warn. I would like to see pr_debug messages from dmesg. > > What I followed is to specify kernel parameter by saying "loglevel=7". > This can be seen confirmed from /proc/cmdline. But still, I donot get > pr_debug level messages either from dmesg or from /var/log/messages. I > also tried echo 7 > /proc/sys/kernel/printk. It does not return what I > expect, either. > > Let me know what I am missing. Thank you very much in advance. > > Cheers, > > Wenda Ni, Ph.D. > > > > ------------------------------ > > Message: 2 > Date: Mon, 17 Oct 2016 19:47:14 -0400 > From: Wenda Ni > Subject: Re: kernel loglevel > To: Thibaut SAUTEREAU > Cc: kernelnewbies at kernelnewbies.org > Message-ID: > H2wWSFpWvg at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Thank you so much, Thibaut. I have spotted the source-code logic in > include/linux/prink.h > > Cheers, > > Wenda Ni, Ph.D. > > > > On Mon, Oct 17, 2016 at 7:41 PM, Thibaut SAUTEREAU < > thibaut.sautereau at telecom-sudparis.eu> wrote: > > On Mon, Oct 17, 2016 at 07:17:32PM -0400, Wenda Ni wrote: > >> Dear all, > >> > >> I am working on a kernel module that incorporate both pr_debug and > >> pr_warn. I would like to see pr_debug messages from dmesg. > >> > >> What I followed is to specify kernel parameter by saying "loglevel=7". > >> This can be seen confirmed from /proc/cmdline. But still, I donot get > >> pr_debug level messages either from dmesg or from /var/log/messages. I > >> also tried echo 7 > /proc/sys/kernel/printk. It does not return what I > >> expect, either. > >> > >> Let me know what I am missing. Thank you very much in advance. > >> > >> Cheers, > >> > >> Wenda Ni, Ph.D. > >> > >> _______________________________________________ > >> Kernelnewbies mailing list > >> Kernelnewbies at kernelnewbies.org > >> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > > > Hello Wenda, > > > > I encountered the same issue a while ago. > > As stated here: http://elinux.org/Debugging_by_printing > > pr_debug is replaced with an empty statement unless the kernel is > compiled > > with DEBUG. So if you just want to play with printing kernel debug logs, > > just define the DEBUG macro in your module source file for testing. > > > > I also observed that without a new line character at the end of the > string > > passed to pr_debug, I could not find the log line in dmesg output. Not > sure > > where this comes from. > > > > -- > > Thibaut SAUTEREAU > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/ > attachments/20161017/8f8419cb/attachment-0001.html > > ------------------------------ > > Message: 3 > Date: Mon, 17 Oct 2016 16:48:46 -0700 > From: Joel Fernandes > Subject: Re: kernel loglevel > To: Wenda Ni > Cc: "kernelnewbies at kernelnewbies.org" > > Message-ID: > mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > Hi Wenda, > > pr_debug needs you to define the DEBUG macro to activate it. > > Check: > http://stackoverflow.com/questions/28936199/pr-debug-not-giving-any-output > > and the kernel docs, > https://www.kernel.org/doc/local/pr_debug.txt > > Joel > > On Mon, Oct 17, 2016 at 4:17 PM, Wenda Ni wrote: > > Dear all, > > > > I am working on a kernel module that incorporate both pr_debug and > > pr_warn. I would like to see pr_debug messages from dmesg. > > > > What I followed is to specify kernel parameter by saying "loglevel=7". > > This can be seen confirmed from /proc/cmdline. But still, I donot get > > pr_debug level messages either from dmesg or from /var/log/messages. I > > also tried echo 7 > /proc/sys/kernel/printk. It does not return what I > > expect, either. > > > > Let me know what I am missing. Thank you very much in advance. > > > > Cheers, > > > > Wenda Ni, Ph.D. > > > > _______________________________________________ > > Kernelnewbies mailing list > > Kernelnewbies at kernelnewbies.org > > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > > > ------------------------------ > > Message: 4 > Date: Tue, 18 Oct 2016 01:41:57 +0200 > From: Thibaut SAUTEREAU > Subject: Re: kernel loglevel > To: Wenda Ni > Cc: kernelnewbies at kernelnewbies.org > Message-ID: <20161017234156.GB1191@mines-telecom.fr> > Content-Type: text/plain; charset="utf-8" > > On Mon, Oct 17, 2016 at 07:17:32PM -0400, Wenda Ni wrote: > > Dear all, > > > > I am working on a kernel module that incorporate both pr_debug and > > pr_warn. I would like to see pr_debug messages from dmesg. > > > > What I followed is to specify kernel parameter by saying "loglevel=7". > > This can be seen confirmed from /proc/cmdline. But still, I donot get > > pr_debug level messages either from dmesg or from /var/log/messages. I > > also tried echo 7 > /proc/sys/kernel/printk. It does not return what I > > expect, either. > > > > Let me know what I am missing. Thank you very much in advance. > > > > Cheers, > > > > Wenda Ni, Ph.D. > > > > _______________________________________________ > > Kernelnewbies mailing list > > Kernelnewbies at kernelnewbies.org > > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > Hello Wenda, > > I encountered the same issue a while ago. > As stated here: http://elinux.org/Debugging_by_printing > pr_debug is replaced with an empty statement unless the kernel is compiled > with DEBUG. So if you just want to play with printing kernel debug logs, > just define the DEBUG macro in your module source file for testing. > > I also observed that without a new line character at the end of the string > passed to pr_debug, I could not find the log line in dmesg output. Not sure > where this comes from. > > -- > Thibaut SAUTEREAU > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: not available > Type: application/pgp-signature > Size: 455 bytes > Desc: not available > Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/ > attachments/20161018/d282cce1/attachment-0001.bin > > ------------------------------ > > Message: 5 > Date: Mon, 17 Oct 2016 20:29:33 -0400 > From: Wenda Ni > Subject: Re: kernel loglevel > To: Joel Fernandes > Cc: "kernelnewbies at kernelnewbies.org" > > Message-ID: > 3PyBBQew at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi Joel, > > It works by specifying ccflags-y += -DDEBUG in the Makefile. > > Thank you for the info!!!! > > > Cheers, > > Wenda Ni, Ph.D. > > > On Mon, Oct 17, 2016 at 7:48 PM, Joel Fernandes > wrote: > > > Hi Wenda, > > > > pr_debug needs you to define the DEBUG macro to activate it. > > > > Check: > > http://stackoverflow.com/questions/28936199/pr-debug- > not-giving-any-output > > > > and the kernel docs, > > https://www.kernel.org/doc/local/pr_debug.txt > > > > Joel > > > > On Mon, Oct 17, 2016 at 4:17 PM, Wenda Ni wrote: > > > Dear all, > > > > > > I am working on a kernel module that incorporate both pr_debug and > > > pr_warn. I would like to see pr_debug messages from dmesg. > > > > > > What I followed is to specify kernel parameter by saying "loglevel=7". > > > This can be seen confirmed from /proc/cmdline. But still, I donot get > > > pr_debug level messages either from dmesg or from /var/log/messages. I > > > also tried echo 7 > /proc/sys/kernel/printk. It does not return what I > > > expect, either. > > > > > > Let me know what I am missing. Thank you very much in advance. > > > > > > Cheers, > > > > > > Wenda Ni, Ph.D. > > > > > > _______________________________________________ > > > Kernelnewbies mailing list > > > Kernelnewbies at kernelnewbies.org > > > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/ > attachments/20161017/16f479c1/attachment-0001.html > > ------------------------------ > > Message: 6 > Date: Tue, 18 Oct 2016 14:11:41 +0000 (UTC) > From: Amit Mahadik > Subject: Fw: TPS65910 Regulator Isuue > To: Kernelnewbies > Message-ID: <1865063607.2350837.1476799901899@mail.yahoo.com> > Content-Type: text/plain; charset="utf-8" > > > > > Hi,? ? ?I am working on integrating TPS695190 regulator code into kernel > version 4.4.16. The regulator powers MMC card slot using Designware MMC > controller. I have declared the necessary code in my board.c file. The MMC > card slot is powered by ldo8 supply declared as > ------------------------------------------------------------ > -----------------Code--------------------------------------- > ------------------------------------------ > > static struct regulator_consumer_supply opv5xc_ldo8_supply[] = { > ??????? REGULATOR_SUPPLY("sd_vdd", NULL), > }; > > static struct regulator_init_data opv5xc_ldo8 = { > ??????? .constraints = { > ??????????????? .min_uV = 1000000, > ??????????????? .max_uV = 3300000, > ??????????????? .valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE | > ??????????????????????????????? REGULATOR_CHANGE_STATUS), > ??????????????? .boot_on = 1, > ??????? }, > ??????? .num_consumer_supplies = ARRAY_SIZE(opv5xc_ldo8_supply), > ??????? .consumer_supplies = opv5xc_ldo8_supply, > }; > static struct tps65910_board tps65910_pdata = { > ????? ??????? .tps65910_pmic_init_data[TPS65911_REG_LDO8]???? = > &opv5xc_ldo8, > }; > static struct i2c_board_info __initdata opv5xc_i2c1_devs[] = { > ??????? { > ??????????????? I2C_BOARD_INFO ("tps65911", TPS65910_I2C_ID1), > ??????????????? .platform_data = &tps65910_pdata, > ??????? }, > }; > ------------------------------------------------------------ > ------------------------------------------------------------ > ----------------------------------------------- > When I call regulator_get struct regulator *sd_vdd = regulator_get(NULL, > "sd_vdd");? function from the Designware MMC driver code function the > kernel panics.I have attached the log file for reference. Can somebody > please let me know what I am doing wrong here? > Regards,Amit. > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/ > attachments/20161018/389572dc/attachment.html > -------------- next part -------------- > An embedded and charset-unspecified text was scrubbed... > Name: log.txt > Url: http://lists.kernelnewbies.org/pipermail/kernelnewbies/ > attachments/20161018/389572dc/attachment.txt > > ------------------------------ > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > > End of Kernelnewbies Digest, Vol 71, Issue 22 > ********************************************* > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20161019/e17a60d7/attachment-0001.html