All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: parisc crash on boot with 4.8+git
  2016-10-08 21:52 parisc crash on boot with 4.8+git Meelis Roos
@ 2016-10-08 21:07 ` Helge Deller
  2016-10-09  9:03   ` Meelis Roos
  0 siblings, 1 reply; 13+ messages in thread
From: Helge Deller @ 2016-10-08 21:07 UTC (permalink / raw)
  To: Meelis Roos, Linux Kernel list, linux-parisc

Hi Meelis,

On 08.10.2016 23:52, Meelis Roos wrote:
> Just tried 4.8.0-11288-gb66484c on three of my parsic machines (enabled 
> strict usercopy checking or somethinng like that in make oldconfig).

It's not related to the usercopy checks, instead it's most likely a
parisc-specific problem I just noticed today as well and which I'm 
currently fixing.
 
> rp3440 worked fine. a500 and rp3410 cras on boot.
> 
> rp3410 crashed on boot with the following:
> 
> Linux version 4.8.0-11288-gb66484c (mroos@rp3410) (gcc version 5.4.0 (Gentoo 5.4.0 p1.0) ) #81 Sat Oct 8 20:40:24 EEST 2016
> unwind_init: start = 0x4076e980, end = 0x407a7060, entries = 14446
> The 64-bit Kernel has started...
> Kernel default page size is 4 KB. Huge pages enabled with 1 MB physical and 2 MB virtual size.
> bootconsole [ttyB0] enabled
> ...
> Memory Ranges:
>  0) Start 0x0000000000000000 End 0x000000003fffffff Size   1024 MB
>  1) Start 0x0000004040000000 End 0x000000407fdfffff Size   1022 MB
> Total Memory: 2046 MB
> Backtrace:
>  [<0000000040102d40>] paging_init+0x5e0/0x740
>  [<0000000040103744>] setup_arch+0x16c/0x1b0
>  [<0000000040100ce0>] start_kernel+0xb8/0x668
> 
> Bad Address (null pointer deref?): Code=15 regs=00000000408034c0 (Addr=000000099cf94000)

You probably are facing one or both of those problems:
1. Your kernel is bigger than the initial kernel mappings
2. You face a bug in the palo boot loader.

Regarding 1, you probably have CONFIG_TRACE=y or CONFIG_TEST_RHASHTABLE=y enabled?
Both increase the kernel size a lot and trigger this bug. 
To fix it, make sure you have this patch in your kernel (it's upstream):
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=690d097c00c88fa9d93d198591e184164b1d8c20

Additionally if people (not you) use a 32bit kernel I suggest this one too (in my for-next tree):
http://git.kernel.org/cgit/linux/kernel/git/deller/parisc-linux.git/commit/?h=for-next&id=96c65e4d1c77f461b34161dc8e6f2db7c50fd3e8

Both patches increase the initial kernel page mappings to 32MB which should be sufficient.

Even if you fix the kernel with the patches above, you still may run
into the palo bug. I've just pushed a fix for it into the palo tree:
https://git.kernel.org/cgit/linux/kernel/git/deller/palo.git/commit/?id=70bd7a9a41e318c0575755a78c4d18ad97495c47

If you rebuild palo, please make sure to install the new ipl boot loader into
the palo partition of your boot disc. palo should report at bootup version 1.96.

Helge

^ permalink raw reply	[flat|nested] 13+ messages in thread

* parisc crash on boot with 4.8+git
@ 2016-10-08 21:52 Meelis Roos
  2016-10-08 21:07 ` Helge Deller
  0 siblings, 1 reply; 13+ messages in thread
From: Meelis Roos @ 2016-10-08 21:52 UTC (permalink / raw)
  To: Linux Kernel list, linux-parisc

Just tried 4.8.0-11288-gb66484c on three of my parsic machines (enabled 
strict usercopy checking or somethinng like that in make oldconfig).

rp3440 worked fine. a500 and rp3410 cras on boot.

rp3410 crashed on boot with the following:

Linux version 4.8.0-11288-gb66484c (mroos@rp3410) (gcc version 5.4.0 (Gentoo 5.4.0 p1.0) ) #81 Sat Oct 8 20:40:24 EEST 2016
unwind_init: start = 0x4076e980, end = 0x407a7060, entries = 14446
The 64-bit Kernel has started...
Kernel default page size is 4 KB. Huge pages enabled with 1 MB physical and 2 MB virtual size.
bootconsole [ttyB0] enabled
Initialized PDC Console for debugging.
Determining PDC firmware type: 64 bit PAT.
model 00008860 00000491 00000000 00000002 3e45475d0860fe3d 100000f0 00000008 000000b2 000000b2
vers  00000302
CPUID vers 20 rev 5 (0x00000285)
capabilities 0x35
model 9000/800/rp3410
parisc_cache_init: Only equivalent aliasing supported!
Memory Ranges:
 0) Start 0x0000000000000000 End 0x000000003fffffff Size   1024 MB
 1) Start 0x0000004040000000 End 0x000000407fdfffff Size   1022 MB
Total Memory: 2046 MB
Backtrace:
 [<0000000040102d40>] paging_init+0x5e0/0x740
 [<0000000040103744>] setup_arch+0x16c/0x1b0
 [<0000000040100ce0>] start_kernel+0xb8/0x668

Bad Address (null pointer deref?): Code=15 regs=00000000408034c0 (Addr=000000099cf94000)
CPU: 0 PID: 0 Comm: swapper Not tainted 4.8.0-11288-gb66484c #81
task: 000000004087ea20 task.stack: 0000000040803000

     YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
PSW: 00001000000001001111111100001110 Not tainted
r00-03  000000ff0804ff0e 0000000000900000 00000000401024c4 00000000408033b0 
r04-07  000000004074a3c0 0000000040af0000 0000004040000000 000000004088e104 
r08-11  0000000040803490 000000407fe00000 0000004040000000 0000000000200000 
r12-15  000000004076e3c0 0000000040122928 0000000040000000 0000000000000323 
r16-19  0000004080000000 0000000000000400 0000000000000000 000000099cf94000 
r20-23  0000000000001000 00000000009f2000 0000000000000001 0000000000000001 
r24-27  00000000095cf940 00000000408e1c90 0000004080000000 000000004074a3c0 
r28-31  0000004040000323 0000000040803510 00000000408034c0 000000099cf94000 
sr00-03  0000000000000000 0000000000000000 0000000000000000 0000000000000000
sr04-07  0000000000000000 0000000000000000 0000000000000000 0000000000000000

IASQ: 0000000000000000 0000000000000000 IAOQ: 000000004010251c 0000000040102520
 IIR: 0ffc12c0    ISR: 0000000000000000  IOR: 000000099cf94000
 CPU:        0   CR30: 0000000040803000 CR31: fffffff0f0e05ee0
 ORIG_R28: 00000000408036d0
 IAOQ[0]: map_pages+0x234/0x320
 IAOQ[1]: map_pages+0x238/0x320
 RP(r2): map_pages+0x1dc/0x320
Backtrace:
 [<0000000040102d40>] paging_init+0x5e0/0x740
 [<0000000040103744>] setup_arch+0x16c/0x1b0
 [<0000000040100ce0>] start_kernel+0xb8/0x668

Kernel panic - not syncing: Bad Address (null pointer deref?)
---[ end Kernel panic - not syncing: Bad Address (null pointer deref?)


A500 dies differently on boot:

Linux version 4.8.0-11288-gb66484c (mroos@a500) (gcc version 5.4.0 (Gentoo 5.4.0 p1.0) ) #100 Sat Oct 8 22:11:04 EEST 2016
unwind_init: start = 0x4074ee10, end = 0x40787d90, entries = 14584
FP[0] enabled: Rev 1 Model 16
The 64-bit Kernel has started...
Kernel default page size is 4 KB. Huge pages enabled with 1 MB physical 
and 2 MB virtual size.
bootconsole [ttyB0] enabled
Initialized PDC Console for debugging.
Determining PDC firmware type: 64 bit PAT.
model 00005cb0 00000491 00000000 00000001 5c5f29fa 100000f0 00000008 000000b2 000000b2
vers  00000301
CPUID vers 17 rev 11 (0x0000022b)
capabilities 0x1
model 9000/800/A500-44
Memory Ranges:
 0) Start 0x0000000000000000 End 0x000000003fffffff Size   1024 MB
Total Memory: 1024 MB
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 258560
Kernel command line: root=/dev/sda3 console=ttyS0 palo_kernel=2/vmlinux
PID hash table entries: 4096 (order: 3, 32768 bytes)
Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
Memory: 1022352K/1048576K available (4328K kernel code, 1812K rwdata, 576K rodata, 1024K init, 424K bss, 26224K reserved, 0K cma-reserved)
virtual kernel memory layout:
   vmalloc : 0x0000000000008000 - 0x000000003f000000   (1007 MB)
   memory  : 0x0000000040000000 - 0x0000000080000000   (1024 MB)
     .init : 0x0000000040100000 - 0x0000000040200000   (1024 kB)
     .data : 0x000000004063a000 - 0x000000004088f370   (2388 kB)
     .text : 0x0000000040200000 - 0x000000004063a000   (4328 kB)
SLUB: HWalign=16, Order=0-3, MinObjects=0, CPUs=1, Nodes=8
NR_IRQS:80
clocksource: cr16: mask: 0xffffffffffffffff max_cycles: 0x657a3c2da0, 
max_idle_ns: 440795224593 ns
Console: colour dummy device 160x64
Calibrating delay loop... 872.44 BogoMIPS (lpj=1744896)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
devtmpfs: initialized
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, 
max_idle_ns: 7645041785100000 ns
NET: Registered protocol family 16
Searching for devices...
Found devices:
1. Crescendo 440 at 0xfffffffffffa0000 [160] { 0, 0x0, 0x5cb, 0x00004 }
2. Memory at 0xfffffffffed08000 [8] { 1, 0x0, 0x09b, 0x00009 }
3. Astro BC Runway Port at 0xfffffffffed00000 [0] { 12, 0x0, 0x582, 0x0000b }
4. Elroy PCI Bridge at 0xfffffffffed30000 [0/0] { 13, 0x0, 0x782, 0x0000a }
5. Elroy PCI Bridge at 0xfffffffffed34000 [0/2] { 13, 0x0, 0x782, 0x0000a }
6. Elroy PCI Bridge at 0xfffffffffed38000 [0/4] { 13, 0x0, 0x782, 0x0000a }
7. Elroy PCI Bridge at 0xfffffffffed3c000 [0/6] { 13, 0x0, 0x782, 0x0000a }
Enabling PDC_PAT chassis codes support v0.05

********** VIRTUAL FRONT PANEL **********
System Boot detected
*****************************************
LEDs:  RUN      ATTENTION     FAULT     REMOTE     POWER
       FLASH    FLASH         FLASH     ON         ON
LED State: Unexpected Reboot. Running non-OS code. Non-critical error 
detected.
Check Chassis and Console Logs for error messages.

processor                 system initialization      1C00

*****************************************

************ EARLY BOOT VFP *************
End of early boot detected
*****************************************
 [<00000000402050c0>] _switch_to_ret+0x0/0xf40

CPU: 0 PID: 1 Comm: swapper Not tainted 4.8.0-11288-gb66484c #100
Backtrace:
 [<00000000402152f4>] show_stack+0x14/0x20
 [<000000004043a848>] dump_stack+0x30/0x40
 [<0000000040215488>] die_if_kernel+0x180/0x298
 [<0000000040216304>] handle_interruption+0x99c/0x9c0

---[ end trace 61bce946a86921df ]---
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b


-- 
Meelis Roos (mroos@linux.ee)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: parisc crash on boot with 4.8+git
  2016-10-08 21:07 ` Helge Deller
@ 2016-10-09  9:03   ` Meelis Roos
  2016-10-09  9:06     ` Helge Deller
  2016-10-09 14:01     ` John David Anglin
  0 siblings, 2 replies; 13+ messages in thread
From: Meelis Roos @ 2016-10-09  9:03 UTC (permalink / raw)
  To: Helge Deller; +Cc: Linux Kernel list, linux-parisc

> On 08.10.2016 23:52, Meelis Roos wrote:
> > Just tried 4.8.0-11288-gb66484c on three of my parsic machines (enabled 
> > strict usercopy checking or somethinng like that in make oldconfig).
> 
> It's not related to the usercopy checks, instead it's most likely a
> parisc-specific problem I just noticed today as well and which I'm 
> currently fixing.
>  
> > rp3440 worked fine. a500 and rp3410 cras on boot.
> > 
> > rp3410 crashed on boot with the following:
> > 
> > Linux version 4.8.0-11288-gb66484c (mroos@rp3410) (gcc version 5.4.0 (Gentoo 5.4.0 p1.0) ) #81 Sat Oct 8 20:40:24 EEST 2016
> > unwind_init: start = 0x4076e980, end = 0x407a7060, entries = 14446
> > The 64-bit Kernel has started...
> > Kernel default page size is 4 KB. Huge pages enabled with 1 MB physical and 2 MB virtual size.
> > bootconsole [ttyB0] enabled
> > ...
> > Memory Ranges:
> >  0) Start 0x0000000000000000 End 0x000000003fffffff Size   1024 MB
> >  1) Start 0x0000004040000000 End 0x000000407fdfffff Size   1022 MB
> > Total Memory: 2046 MB
> > Backtrace:
> >  [<0000000040102d40>] paging_init+0x5e0/0x740
> >  [<0000000040103744>] setup_arch+0x16c/0x1b0
> >  [<0000000040100ce0>] start_kernel+0xb8/0x668
> > 
> > Bad Address (null pointer deref?): Code=15 regs=00000000408034c0 (Addr=000000099cf94000)
> 
> You probably are facing one or both of those problems:
> 1. Your kernel is bigger than the initial kernel mappings
> 2. You face a bug in the palo boot loader.
> 
> Regarding 1, you probably have CONFIG_TRACE=y or CONFIG_TEST_RHASHTABLE=y enabled?
> Both increase the kernel size a lot and trigger this bug. 

# CONFIG_TEST_RHASHTABLE is not set

There is no CONFIG_TRACE in my .config.

grep TRACE .config gives
CONFIG_STACKTRACE_SUPPORT=y
# CONFIG_TREE_RCU_TRACE is not set
CONFIG_SYSCTL_EXCEPTION_TRACE=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
# CONFIG_TRACE_SINK is not set
# CONFIG_STACKTRACE is not set
# CONFIG_RCU_TRACE is not set
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
# CONFIG_FTRACE is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
CONFIG_TRACE_IRQFLAGS_SUPPORT=y

> To fix it, make sure you have this patch in your kernel (it's upstream):
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=690d097c00c88fa9d93d198591e184164b1d8c20

I saw this batch of parisc changes in mainline, that's why I built new 
kernels for test and then I got the error. 4.8.0-11288-gb66484c is the 
version I ran, with the commit AFAIK.
 
> Additionally if people (not you) use a 32bit kernel I suggest this one too (in my for-next tree):
> http://git.kernel.org/cgit/linux/kernel/git/deller/parisc-linux.git/commit/?h=for-next&id=96c65e4d1c77f461b34161dc8e6f2db7c50fd3e8
> 
> Both patches increase the initial kernel page mappings to 32MB which should be sufficient.
> 
> Even if you fix the kernel with the patches above, you still may run
> into the palo bug. I've just pushed a fix for it into the palo tree:
> https://git.kernel.org/cgit/linux/kernel/git/deller/palo.git/commit/?id=70bd7a9a41e318c0575755a78c4d18ad97495c47
> 
> If you rebuild palo, please make sure to install the new ipl boot loader into
> the palo partition of your boot disc. palo should report at bootup version 1.96.
> 
> Helge
> 

-- 
Meelis Roos (mroos@linux.ee)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: parisc crash on boot with 4.8+git
  2016-10-09  9:03   ` Meelis Roos
@ 2016-10-09  9:06     ` Helge Deller
  2016-10-09 21:09       ` Meelis Roos
  2016-10-09 14:01     ` John David Anglin
  1 sibling, 1 reply; 13+ messages in thread
From: Helge Deller @ 2016-10-09  9:06 UTC (permalink / raw)
  To: Meelis Roos; +Cc: Linux Kernel list, linux-parisc

On 09.10.2016 11:03, Meelis Roos wrote:
>> On 08.10.2016 23:52, Meelis Roos wrote:
>>> rp3410 crashed on boot with the following:
>>>
>>> Linux version 4.8.0-11288-gb66484c (mroos@rp3410) (gcc version 5.4.0 (Gentoo 5.4.0 p1.0) ) #81 Sat Oct 8 20:40:24 EEST 2016
>>> unwind_init: start = 0x4076e980, end = 0x407a7060, entries = 14446
>>> The 64-bit Kernel has started...
>>> Kernel default page size is 4 KB. Huge pages enabled with 1 MB physical and 2 MB virtual size.
>>> bootconsole [ttyB0] enabled
>>> ...
>>> Memory Ranges:
>>>  0) Start 0x0000000000000000 End 0x000000003fffffff Size   1024 MB
>>>  1) Start 0x0000004040000000 End 0x000000407fdfffff Size   1022 MB
>>> Total Memory: 2046 MB
>>> Backtrace:
>>>  [<0000000040102d40>] paging_init+0x5e0/0x740
>>>  [<0000000040103744>] setup_arch+0x16c/0x1b0
>>>  [<0000000040100ce0>] start_kernel+0xb8/0x668
>>>
>>> Bad Address (null pointer deref?): Code=15 regs=00000000408034c0 (Addr=000000099cf94000)
>>
>> You probably are facing one or both of those problems:
>> 1. Your kernel is bigger than the initial kernel mappings
>> 2. You face a bug in the palo boot loader.
>>
>> Regarding 1, you probably have CONFIG_TRACE=y or CONFIG_TEST_RHASHTABLE=y enabled?
>> Both increase the kernel size a lot and trigger this bug. 
> 
> # CONFIG_TEST_RHASHTABLE is not set
> 
> There is no CONFIG_TRACE in my .config.
> # CONFIG_FTRACE is not set

I meant CONFIG_FTRACE (which you don't seem to have enabled).

I just pushed two updated patches to my for-next git tree.
Please pull them on top of Linux head and try again (please update palo before).
http://git.kernel.org/cgit/linux/kernel/git/deller/parisc-linux.git/log/?h=for-next

>> Even if you fix the kernel with the patches above, you still may run
>> into the palo bug. I've just pushed a fix for it into the palo tree:
>> https://git.kernel.org/cgit/linux/kernel/git/deller/palo.git/commit/?id=70bd7a9a41e318c0575755a78c4d18ad97495c47
>>
>> If you rebuild palo, please make sure to install the new ipl boot loader into
>> the palo partition of your boot disc. palo should report at bootup version 1.96.

Same here. Please pull latest version, and install it:
https://git.kernel.org/cgit/linux/kernel/git/deller/palo.git/

Helge

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: parisc crash on boot with 4.8+git
  2016-10-09  9:03   ` Meelis Roos
  2016-10-09  9:06     ` Helge Deller
@ 2016-10-09 14:01     ` John David Anglin
  2016-10-09 21:13       ` Meelis Roos
  1 sibling, 1 reply; 13+ messages in thread
From: John David Anglin @ 2016-10-09 14:01 UTC (permalink / raw)
  To: Meelis Roos; +Cc: Helge Deller, Linux Kernel list, linux-parisc

On 2016-10-09, at 5:03 AM, Meelis Roos wrote:

>>> Linux version 4.8.0-11288-gb66484c (mroos@rp3410) (gcc version 5.4.0 (Gentoo 5.4.0 p1.0) ) #81 Sat Oct 8 20:40:24 EEST 2016
>>> unwind_init: start = 0x4076e980, end = 0x407a7060, entries = 14446
>>> The 64-bit Kernel has started...
>>> Kernel default page size is 4 KB. Huge pages enabled with 1 MB physical and 2 MB virtual size.

The first thing I would suspect is the enabling of huge pages.

Dave
--
John David Anglin	dave.anglin@bell.net




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: parisc crash on boot with 4.8+git
  2016-10-09 21:13       ` Meelis Roos
@ 2016-10-09 19:50         ` Helge Deller
  0 siblings, 0 replies; 13+ messages in thread
From: Helge Deller @ 2016-10-09 19:50 UTC (permalink / raw)
  To: Meelis Roos, John David Anglin; +Cc: Linux Kernel list, linux-parisc

On 09.10.2016 23:13, Meelis Roos wrote:
>>>>> Linux version 4.8.0-11288-gb66484c (mroos@rp3410) (gcc version 5.4.0 (Gentoo 5.4.0 p1.0) ) #81 Sat Oct 8 20:40:24 EEST 2016
>>>>> unwind_init: start = 0x4076e980, end = 0x407a7060, entries = 14446
>>>>> The 64-bit Kernel has started...
>>>>> Kernel default page size is 4 KB. Huge pages enabled with 1 MB physical and 2 MB virtual size.
>>
>> The first thing I would suspect is the enabling of huge pages.
> 
> There seems to be no config option to disable that for test?
 
CONFIG_HUGETLBFS=n

Helge

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: parisc crash on boot with 4.8+git
  2016-10-09 21:09       ` Meelis Roos
@ 2016-10-09 19:54         ` Helge Deller
  2016-10-10  6:04           ` Meelis Roos
  0 siblings, 1 reply; 13+ messages in thread
From: Helge Deller @ 2016-10-09 19:54 UTC (permalink / raw)
  To: Meelis Roos; +Cc: Linux Kernel list, linux-parisc

On 09.10.2016 23:09, Meelis Roos wrote:
>>>> Even if you fix the kernel with the patches above, you still may run
>>>> into the palo bug. I've just pushed a fix for it into the palo tree:
>>>> https://git.kernel.org/cgit/linux/kernel/git/deller/palo.git/commit/?id=70bd7a9a41e318c0575755a78c4d18ad97495c47
>>>>
>>>> If you rebuild palo, please make sure to install the new ipl boot loader into
>>>> the palo partition of your boot disc. palo should report at bootup version 1.96.
>>
>> Same here. Please pull latest version, and install it:
>> https://git.kernel.org/cgit/linux/kernel/git/deller/palo.git/
> 
> palo ipl 1.96 http://www.parisc-linux.org - Sun, 08 Oct 2016 22:40:31 +0100
> 
> Just palo with newst upstream kernel git did not change anything, so 
> it's not palo.
> 
> 
> Pulled 
> git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git 
> but it seems to be alreay up to date - these commits are in my tested 
> upstream that broke the booting?

Really? I just updated it a few hours ago. Please pull the "for-next" branch.

Can you send the last line of your "System.map" file, e.g.
0000000041f00000 B _end

What is the output of palo when booting ?

Helge

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: parisc crash on boot with 4.8+git
  2016-10-09  9:06     ` Helge Deller
@ 2016-10-09 21:09       ` Meelis Roos
  2016-10-09 19:54         ` Helge Deller
  0 siblings, 1 reply; 13+ messages in thread
From: Meelis Roos @ 2016-10-09 21:09 UTC (permalink / raw)
  To: Helge Deller; +Cc: Linux Kernel list, linux-parisc

> >> Even if you fix the kernel with the patches above, you still may run
> >> into the palo bug. I've just pushed a fix for it into the palo tree:
> >> https://git.kernel.org/cgit/linux/kernel/git/deller/palo.git/commit/?id=70bd7a9a41e318c0575755a78c4d18ad97495c47
> >>
> >> If you rebuild palo, please make sure to install the new ipl boot loader into
> >> the palo partition of your boot disc. palo should report at bootup version 1.96.
> 
> Same here. Please pull latest version, and install it:
> https://git.kernel.org/cgit/linux/kernel/git/deller/palo.git/

palo ipl 1.96 http://www.parisc-linux.org - Sun, 08 Oct 2016 22:40:31 +0100

Just palo with newst upstream kernel git did not change anything, so 
it's not palo.


Pulled 
git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git 
but it seems to be alreay up to date - these commits are in my tested 
upstream that broke the booting?


-- 
Meelis Roos (mroos@linux.ee)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: parisc crash on boot with 4.8+git
  2016-10-09 14:01     ` John David Anglin
@ 2016-10-09 21:13       ` Meelis Roos
  2016-10-09 19:50         ` Helge Deller
  0 siblings, 1 reply; 13+ messages in thread
From: Meelis Roos @ 2016-10-09 21:13 UTC (permalink / raw)
  To: John David Anglin; +Cc: Helge Deller, Linux Kernel list, linux-parisc

> >>> Linux version 4.8.0-11288-gb66484c (mroos@rp3410) (gcc version 5.4.0 (Gentoo 5.4.0 p1.0) ) #81 Sat Oct 8 20:40:24 EEST 2016
> >>> unwind_init: start = 0x4076e980, end = 0x407a7060, entries = 14446
> >>> The 64-bit Kernel has started...
> >>> Kernel default page size is 4 KB. Huge pages enabled with 1 MB physical and 2 MB virtual size.
> 
> The first thing I would suspect is the enabling of huge pages.

There seems to be no config option to disable that for test?

-- 
Meelis Roos (mroos@linux.ee)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: parisc crash on boot with 4.8+git
  2016-10-09 19:54         ` Helge Deller
@ 2016-10-10  6:04           ` Meelis Roos
  2016-10-10 14:47             ` Helge Deller
  0 siblings, 1 reply; 13+ messages in thread
From: Meelis Roos @ 2016-10-10  6:04 UTC (permalink / raw)
  To: Helge Deller; +Cc: Linux Kernel list, linux-parisc

> >>>> Even if you fix the kernel with the patches above, you still may run
> >>>> into the palo bug. I've just pushed a fix for it into the palo tree:
> >>>> https://git.kernel.org/cgit/linux/kernel/git/deller/palo.git/commit/?id=70bd7a9a41e318c0575755a78c4d18ad97495c47
> >>>>
> >>>> If you rebuild palo, please make sure to install the new ipl boot loader into
> >>>> the palo partition of your boot disc. palo should report at bootup version 1.96.
> >>
> >> Same here. Please pull latest version, and install it:
> >> https://git.kernel.org/cgit/linux/kernel/git/deller/palo.git/
> > 
> > palo ipl 1.96 http://www.parisc-linux.org - Sun, 08 Oct 2016 22:40:31 +0100
> > 
> > Just palo with newst upstream kernel git did not change anything, so 
> > it's not palo.
> > 
> > 
> > Pulled 
> > git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git 
> > but it seems to be alreay up to date - these commits are in my tested 
> > upstream that broke the booting?
> 
> Really? I just updated it a few hours ago. Please pull the "for-next" branch.
> 
> Can you send the last line of your "System.map" file, e.g.
> 0000000041f00000 B _end
> 
> What is the output of palo when booting ?

Sorry, I pulled from the default branch before, now for-next and it did 
pull stuff.

System.map ends with

0000000040900000 B _end



HARD Booted.
palo ipl 1.96 http://www.parisc-linux.org - Sun, 08 Oct 2016 22:40:31 +0100

Partition Start(MB) End(MB) Id Type
1               1      32   f0 Palo
2              33     224   83 ext2
3             225   31696   83 ext2
4           31697   34715   82 swap

PALO(F0) partition contains:

Command line for kernel: 'root=/dev/sdb3 console=ttyS1 
palo_kernel=2/vmlinux'
Selected kernel: /vmlinux from partition 2
ELF64 executable
Entry 00100000 first 00100000 n 5
Segment 0 load 00100000 size 135536 mediaptr 0x1000
Segment 1 load 00122000 size 23320 mediaptr 0x23000
Segment 2 load 00200000 size 4541488 mediaptr 0x29000
Segment 3 load 00655000 size 1393916 mediaptr 0x47e000
Segment 4 load 00800000 size 1045640 mediaptr 0x5d3000
Branching to kernel entry point 0x00100000.  If this is the last
message you see, you may need to switch your console.  This is
a common symptom -- search the FAQ and mailing list at parisc-linux.org

Linux version 4.8.0-11292-gf79b076 (mroos@rp3410) (gcc version 5.4.0 (Gentoo 5.4.0 p1.0) ) #82 Mon Oct 10 01:25:58 EEST 2016
unwind_init: start = 0x40770e1c, end = 0x407a94fc, entries = 14446
FP[0] enabled: Rev 1 Model 20
The 64-bit Kernel has started...
Kernel default page size is 4 KB. Huge pages enabled with 1 MB physical and 2 MB virtual size.
bootconsole [ttyB0] enabled
Initialized PDC Console for debugging.
Determining PDC firmware type: 64 bit PAT.
model 00008860 00000491 00000000 00000002 3e45475d0860fe3d 100000f0 00000008 000000b2 000000b2
vers  00000302
CPUID vers 20 rev 5 (0x00000285)
capabilities 0x35
model 9000/800/rp3410  
parisc_cache_init: Only equivalent aliasing supported!
Memory Ranges:
 0) Start 0x0000000000000000 End 0x000000003fffffff Size   1024 MB
 1) Start 0x0000004040000000 End 0x000000407fdfffff Size   1022 MB
Total Memory: 2046 MB
Backtrace:
 [<0000000040102d40>] paging_init+0x5e0/0x740
 [<0000000040103744>] setup_arch+0x16c/0x1b0
 [<0000000040100ce0>] start_kernel+0xb8/0x668


Bad Address (null pointer deref?): Code=15 regs=00000000408004c0 (Addr=0000006cbe693000)
CPU: 0 PID: 0 Comm: swapper Not tainted 4.8.0-11292-gf79b076 #82
task: 000000004087ba20 task.stack: 0000000040800000

     YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
PSW: 00001000000001001111111100001110 Not tainted
r00-03  000000ff0804ff0e 0000000000900000 00000000401024c4 00000000408003b0
r04-07  00000000406b45c0 0000000040ae0000 0000004040000000 000000004088b104
r08-11  0000000040800490 000000407fe00000 0000004040000000 0000000000200000
r12-15  00000000406d85c0 0000000040122928 0000000040000000 0000000000000323
r16-19  0000004080000000 0000000000000400 0000000000000000 0000006cbe693000
r20-23  0000000000001000 00000000009e2000 0000000000000001 0000000000000001
r24-27  000000006c7e693e 00000000408eec90 0000004080000000 00000000406b45c0
r28-31  0000004040000323 0000000040800510 00000000408004c0 0000006cbe693000
sr00-03  0000000000000000 0000000000000000 0000000000000000 0000000000000000
sr04-07  0000000000000000 0000000000000000 0000000000000000 0000000000000000

IASQ: 0000000000000000 0000000000000000 IAOQ: 000000004010251c 0000000040102520
 IIR: 0ffc12c0    ISR: 0000000000000000  IOR: 0000006cbe693000
 CPU:        0   CR30: 0000000040800000 CR31: fffffff0f0e05ee0
 ORIG_R28: 00000000408006d0
 IAOQ[0]: map_pages+0x234/0x320
 IAOQ[1]: map_pages+0x238/0x320
 RP(r2): map_pages+0x1dc/0x320
Backtrace:
 [<0000000040102d40>] paging_init+0x5e0/0x740
 [<0000000040103744>] setup_arch+0x16c/0x1b0
 [<0000000040100ce0>] start_kernel+0xb8/0x668

Kernel panic - not syncing: Bad Address (null pointer deref?)
---[ end Kernel panic - not syncing: Bad Address (null pointer deref?)



-- 
Meelis Roos (mroos@linux.ee)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: parisc crash on boot with 4.8+git
  2016-10-10  6:04           ` Meelis Roos
@ 2016-10-10 14:47             ` Helge Deller
  2016-10-10 16:26               ` Meelis Roos
  0 siblings, 1 reply; 13+ messages in thread
From: Helge Deller @ 2016-10-10 14:47 UTC (permalink / raw)
  To: Meelis Roos; +Cc: Linux Kernel list, linux-parisc

On 10.10.2016 08:04, Meelis Roos wrote:
>>>>>> Even if you fix the kernel with the patches above, you still may run
>>>>>> into the palo bug. I've just pushed a fix for it into the palo tree:
>>>>>> https://git.kernel.org/cgit/linux/kernel/git/deller/palo.git/commit/?id=70bd7a9a41e318c0575755a78c4d18ad97495c47
>>>>>>
>>>>>> If you rebuild palo, please make sure to install the new ipl boot loader into
>>>>>> the palo partition of your boot disc. palo should report at bootup version 1.96.
>>>>
>>>> Same here. Please pull latest version, and install it:
>>>> https://git.kernel.org/cgit/linux/kernel/git/deller/palo.git/
>>>
>>> palo ipl 1.96 http://www.parisc-linux.org - Sun, 08 Oct 2016 22:40:31 +0100
>>>
>>> Just palo with newst upstream kernel git did not change anything, so 
>>> it's not palo.
>>>
>>>
>>> Pulled 
>>> git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git 
>>> but it seems to be alreay up to date - these commits are in my tested 
>>> upstream that broke the booting?
>>
>> Really? I just updated it a few hours ago. Please pull the "for-next" branch.
>>
>> Can you send the last line of your "System.map" file, e.g.
>> 0000000041f00000 B _end
>>
>> What is the output of palo when booting ?
> 
> Sorry, I pulled from the default branch before, now for-next and it did 
> pull stuff.
> 
> System.map ends with
> 
> 0000000040900000 B _end
> 
> 
> 
> HARD Booted.
> palo ipl 1.96 http://www.parisc-linux.org - Sun, 08 Oct 2016 22:40:31 +0100
> 
> Partition Start(MB) End(MB) Id Type
> 1               1      32   f0 Palo
> 2              33     224   83 ext2
> 3             225   31696   83 ext2
> 4           31697   34715   82 swap
> 
> PALO(F0) partition contains:
> 
> Command line for kernel: 'root=/dev/sdb3 console=ttyS1 
> palo_kernel=2/vmlinux'
> Selected kernel: /vmlinux from partition 2
> ELF64 executable
> Entry 00100000 first 00100000 n 5
> Segment 0 load 00100000 size 135536 mediaptr 0x1000
> Segment 1 load 00122000 size 23320 mediaptr 0x23000
> Segment 2 load 00200000 size 4541488 mediaptr 0x29000
> Segment 3 load 00655000 size 1393916 mediaptr 0x47e000
> Segment 4 load 00800000 size 1045640 mediaptr 0x5d3000
> Branching to kernel entry point 0x00100000.  If this is the last
> message you see, you may need to switch your console.  This is
> a common symptom -- search the FAQ and mailing list at parisc-linux.org
> 
> Linux version 4.8.0-11292-gf79b076 (mroos@rp3410) (gcc version 5.4.0 (Gentoo 5.4.0 p1.0) ) #82 Mon Oct 10 01:25:58 EEST 2016
> unwind_init: start = 0x40770e1c, end = 0x407a94fc, entries = 14446
> FP[0] enabled: Rev 1 Model 20
> The 64-bit Kernel has started...
> Kernel default page size is 4 KB. Huge pages enabled with 1 MB physical and 2 MB virtual size.
> bootconsole [ttyB0] enabled
> Initialized PDC Console for debugging.
> Determining PDC firmware type: 64 bit PAT.
> model 00008860 00000491 00000000 00000002 3e45475d0860fe3d 100000f0 00000008 000000b2 000000b2
> vers  00000302
> CPUID vers 20 rev 5 (0x00000285)
> capabilities 0x35
> model 9000/800/rp3410  
> parisc_cache_init: Only equivalent aliasing supported!
> Memory Ranges:
>  0) Start 0x0000000000000000 End 0x000000003fffffff Size   1024 MB
>  1) Start 0x0000004040000000 End 0x000000407fdfffff Size   1022 MB
> Total Memory: 2046 MB

2046 MB ???
That's strange, it should be 2048 MB.

Can you check in your firmware "service" or "Configuration" menu, if it 
reports some entries in your PDT (Page Deallocation Table) ?
What happens if you clean the PDT entries (see firmware menu) and boot again?

Helge

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: parisc crash on boot with 4.8+git
  2016-10-10 14:47             ` Helge Deller
@ 2016-10-10 16:26               ` Meelis Roos
  2016-10-11 18:40                 ` Helge Deller
  0 siblings, 1 reply; 13+ messages in thread
From: Meelis Roos @ 2016-10-10 16:26 UTC (permalink / raw)
  To: Helge Deller; +Cc: Linux Kernel list, linux-parisc

> > Memory Ranges:
> >  0) Start 0x0000000000000000 End 0x000000003fffffff Size   1024 MB
> >  1) Start 0x0000004040000000 End 0x000000407fdfffff Size   1022 MB
> > Total Memory: 2046 MB
> 
> 2046 MB ???
> That's strange, it should be 2048 MB.
> 
> Can you check in your firmware "service" or "Configuration" menu, if it 
> reports some entries in your PDT (Page Deallocation Table) ?
> What happens if you clean the PDT entries (see firmware menu) and boot again?

Service Menu: Enter command > pdt

PAGE DEALLOCATION TABLE INFORMATION

   Location      Address       Type        Perm  Page  
   ------------  ------------  ----------  ----  ---------

   No Entries in Page Deallocation Table 

   PDT Entries Used: 0
   PDT Entries Free: 3000
   PDT Total Size:   3000

Seems it is not PDT?

-- 
Meelis Roos (mroos@linux.ee)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: parisc crash on boot with 4.8+git
  2016-10-10 16:26               ` Meelis Roos
@ 2016-10-11 18:40                 ` Helge Deller
  0 siblings, 0 replies; 13+ messages in thread
From: Helge Deller @ 2016-10-11 18:40 UTC (permalink / raw)
  To: Meelis Roos, linux-parisc, James Bottomley, John David Anglin
  Cc: Linux Kernel list

* Meelis Roos <mroos@linux.ee>:
> > > Memory Ranges:
> > >  0) Start 0x0000000000000000 End 0x000000003fffffff Size   1024 MB
> > >  1) Start 0x0000004040000000 End 0x000000407fdfffff Size   1022 MB
> > > Total Memory: 2046 MB

Meelis and myself debugged the crash off-list.
It turns out, that I missed to zero-initialize the new memblocks.
Patch below fixes this.

Helge

------------
parisc: Zero-initialize newly alloced memblock

Commit 4fe9e1d957e4 ("parisc: Drop bootmem and switch to memblock")
switched to the memblock allocator, but missed to zero-initialize the
newly allocated memblocks. This lead to crashes on some machines like
the rp3410.

Fixes: 4fe9e1d957e4 ("parisc: Drop bootmem and switch to memblock")
Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 356f384..62ac801 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -105,6 +105,8 @@ static void * __init get_memblock(unsigned long size)
 	else
 		panic("get_memblock() failed.\n");
 
+	memset(__va(phys), 0, size);
+
 	return __va(phys);
 }
 

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-10-11 18:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-08 21:52 parisc crash on boot with 4.8+git Meelis Roos
2016-10-08 21:07 ` Helge Deller
2016-10-09  9:03   ` Meelis Roos
2016-10-09  9:06     ` Helge Deller
2016-10-09 21:09       ` Meelis Roos
2016-10-09 19:54         ` Helge Deller
2016-10-10  6:04           ` Meelis Roos
2016-10-10 14:47             ` Helge Deller
2016-10-10 16:26               ` Meelis Roos
2016-10-11 18:40                 ` Helge Deller
2016-10-09 14:01     ` John David Anglin
2016-10-09 21:13       ` Meelis Roos
2016-10-09 19:50         ` Helge Deller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.