Re: How to correctly decode fun+X/Y

2015-12-07 Thread Andrey Skvortsov
On 04 Dec, Daniel Baluta wrote:
> On Thu, Dec 3, 2015 at 8:14 PM, Matwey V. Kornilov
>  wrote:
> > Hello,
> >
> > I have the following stack trace:
> >
> > [ 1351.381696] a.out   S c0afb050 0  1676   1658 0x
> > [ 1351.387048] [] (__schedule) from []
> > (schedule+0x58/0xcc)
> > [ 1351.392436] [] (schedule) from []
> > (tty_port_block_til_ready+0x1a8/0x35c)
> > [ 1351.396937] [] (tty_port_block_til_ready) from []
> > (uart_open+0x118/0x158)
> > [ 1351.402560] [] (uart_open) from []
> > (tty_open+0x11c/0x600)
> > [ 1351.407043] [] (tty_open) from []
> > (chrdev_open+0xb4/0x188)
> > [ 1351.412556] [] (chrdev_open) from []
> > (do_dentry_open+0x230/0x330)
> > [ 1351.417038] [] (do_dentry_open) from []
> > (vfs_open+0x64/0x6c)
> > [ 1351.422470] [] (vfs_open) from []
> > (do_last+0x510/0xd94)
> > [ 1351.426909] [] (do_last) from []
> > (path_openat+0x8c/0x270)
> > [ 1351.432398] [] (path_openat) from []
> > (do_filp_open+0x70/0xd4)
> > [ 1351.436815] [] (do_filp_open) from []
> > (do_sys_open+0x120/0x1e4)
> > [ 1351.442117] [] (do_sys_open) from []
> > (SyS_open+0x28/0x30)
> > [ 1351.447046] [] (SyS_open) from []
> > (ret_fast_syscall+0x0/0x34)
> >
> >
> > Could please explain, how to correctly decode
> > tty_port_block_til_ready+0x1a8/0x35c to the instruction or line of code
> > using gdb?
> 
> $ gdb ./vmlinux
> 
> list *(tty_port_block_til_ready+0x1a8)
> 

Or even easier using decode_stacktrace.sh from the linux
kernel tree (exists since 3.16).


Usage:

./decode_stacktrace.sh [vmlinux] [base path]

Where vmlinux is the vmlinux to extract line numbers from and base path
is the path that points to the root of the build tree, for example:

./decode_stacktrace.sh vmlinux /home/sasha/linux/ < input.log > 
output.log


Then stacktrace will include file and line number:

  [  635.148361]  dump_stack (lib/dump_stack.c:52)
  [  635.149127]  warn_slowpath_common (kernel/panic.c:418)
  [  635.150214]  warn_slowpath_null (kernel/panic.c:453)
  [  635.151031]  _oalloc_pages_slowpath+0x6a/0x7d0
  [  635.152171]  ? zone_watermark_ok (mm/page_alloc.c:1728)
  [  635.152988]  ? get_page_from_freelist (mm/page_alloc.c:1939)
  [  635.154766]  __alloc_pages_nodemask (mm/page_alloc.c:2766)


-- 
Best regards,
Andrey Skvortsov

Secure eMail with gnupg: See http://www.gnupg.org/
PGP Key ID: 0x57A3AEAD


signature.asc
Description: PGP signature
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


if i want powerpc "local bus" support, must i select CONFIG_FSL_LBC?

2015-12-07 Thread Robert P. J. Day

  trying to make a long story short, was handed an aging powerpc
MPC8360e system on which to place linux, along with a BSP that does in
fact generate a bootable kernel and filesystem. however, according to
this online page (and i am *not* in any way a powerpc expert):

http://cache.freescale.com/files/netcomm/doc/fact_sheet/MPC8360EFS.pdf

this processor has something called a "local bus", off of which on
this board hang things like DSP, FPGA and other things.

  during boot, i can see absolutely no mention of any of the devices
attached to this local bus, or even that the bus itself is recognized,
then i noticed that the .config file used to build this 3.14.29 kernel
does not select what looks like the appropriate kernel option FSL_LBC.

  if anyone out there is a powerpc expert, can you confirm that you
need to select that option (and hence compile in the source file
arch/powerpc/sysdev/fsl_lbc.c) to get that support?

  i'm puzzled only because, if that file is required for local bus
support, the people who gave us the BSP really should have turned it
on.

  thanks for any guidance.

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday



___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies