public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
* Re: linux 3.10.1 with initrd (was Re: linux 3.8.12-1 (atari flavour) does not boot)
       [not found]             ` <Pine.BSM.4.64L.1307201716460.31890@herc.mirbsd.org>
@ 2013-07-31  8:39               ` Geert Uytterhoeven
  2013-07-31  9:01                 ` linux 3.10.1 with initrd Christian T. Steigies
  2013-08-02  9:08                 ` linux 3.10.1 with initrd (was Re: linux 3.8.12-1 (atari flavour) does not boot) Michael Schmitz
  0 siblings, 2 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2013-07-31  8:39 UTC (permalink / raw)
  To: Thorsten Glaser, Mikael Pettersson; +Cc: Debian m68k, Linux/m68k

On Sat, Jul 20, 2013 at 7:27 PM, Thorsten Glaser <tg@mirbsd.de> wrote:
> So good, so far. An ARAnyM log of the build (kernel
> messages) is attached. There’s one thing sticking out:
>
> [    0.160000] WARNING: at /root/linux-3.10.1/init/main.c:698 do_one_initcall+0x12e/0x13a()
> [    0.160000] initcall param_sysfs_init+0x0/0x1a4 returned with disabled interrupts
>
> This seems to happen for several initcalls. Geert et al,
> can you have a look at them, they’re scary ☺

It only happens on multi-platform kernels, because of the following definition
of ALLOWINT:

#if defined(MACH_ATARI_ONLY)
        /* block out HSYNC = ipl 2 on the atari */
#define ALLOWINT        (~0x500)
#else
        /* portable version */
#define ALLOWINT        (~0x700)
#endif /* machine compilation types */

On an Atari-only kernel, flags is either 0x00c02204 or 0x00c02214.
Hence "flags & ~ALLOWINT" is "flags & 0x500" is always zero.

On a multi-platform kernel, flags is one of 0x00c02004, 0x00c02014,
0x00c02204, or 0x00c02214.
Hence "flags & ~ALLOWINT" is "flags & 0x700" is sometimes non-zero,
triggering the warning.

Anyone who sees a solution that doesn't involve adding a variable to hold
ALLOWINT?

We're already having a check for Q40 in arch_local_irq_enable()
(in multi-platfom kernels only).

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: linux 3.10.1 with initrd
  2013-07-31  8:39               ` linux 3.10.1 with initrd (was Re: linux 3.8.12-1 (atari flavour) does not boot) Geert Uytterhoeven
@ 2013-07-31  9:01                 ` Christian T. Steigies
  2013-07-31 11:57                   ` Thorsten Glaser
  2013-08-02  9:08                 ` linux 3.10.1 with initrd (was Re: linux 3.8.12-1 (atari flavour) does not boot) Michael Schmitz
  1 sibling, 1 reply; 9+ messages in thread
From: Christian T. Steigies @ 2013-07-31  9:01 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Thorsten Glaser, Debian m68k, Linux/m68k

Not sure if this is the correct thread, but crest is working with your new
kernel, without using a memfile! The only thing that does not work seems to
be nfs so far... maybe I should check the cirrusfb driver and also try to
set this up in AmigaOS so a standard VGA monitor would work without any
adapters.

Is gcc-4.8 now the default compiler for all buildds?

Christian

[    0.000000] Linux version 3.10-0+m68k.2-m68k (debian-kernel@lists.debian.org) (gcc version 4.8.1 (Debian 4.8.1-7+m68k.1) ) #1 Debian 3.10.1-1+m68k.5 (2013-07-24)
[    0.000000] Enabling workaround for errata I14
[    0.000000] console [debug0] enabled
[    0.000000] Amiga hardware found: [A4000] VIDEO BLITTER AUDIO FLOPPY A4000_IDE KEYBOARD MOUSE SERIAL PARALLEL A3000_CLK CHIP_RAM PAULA LISA ALICE_PAL ZORRO3 
[    0.000000] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat 002a3c14, node_mem_map 00314000
[    0.000000]   DMA zone: 288 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 32768 pages, LIFO batch:7
[    0.000000] initrd: 07cb3f1f - 08000000
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32480
[    0.000000] Kernel command line: root=/dev/hda3 fb=false video=amifb:ntsc-lace debug=mem
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Sorting __ex_table...
[    0.000000] Memory: 123252k/123252k available (1888k kernel code, 5792k data, 140k init)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0x002a370c - 0x002a3b0c   (   1 KiB)
[    0.000000]     kmap    : 0xd0000000 - 0xf0000000   ( 512 MiB)
[    0.000000]     vmalloc : 0x08800000 - 0xd0000000   (3192 MiB)
[    0.000000]     lowmem  : 0x00000000 - 0x08000000   ( 128 MiB)
[    0.000000]       .init : 0x002ca000 - 0x002ed000   ( 140 KiB)
[    0.000000]       .text : 0x00001000 - 0x001d8668   (1886 KiB)
[    0.000000]       .data : 0x001dac60 - 0x002c94d4   ( 955 KiB)
[    0.000000]       .bss  : 0x002a34e0 - 0x002c94d4   ( 152 KiB)
[    0.000000] NR_IRQS:200
[    0.000000] Console: colour dummy device 80x25
[    0.000000] console [tty0] enabled
[    0.010000] Calibrating delay loop... 98.20 BogoMIPS (lpj=491008)
[    0.100000] pid_max: default: 32768 minimum: 301
[    0.100000] Mount-cache hash table entries: 512
[    0.130000] devtmpfs: initialized
[    0.150000] NET: Registered protocol family 16
[    0.200000] bio: create slab <bio-0> at 0
[    0.220000] SCSI subsystem initialized
[    0.390000] NET: Registered protocol family 2
[    0.400000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.410000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.410000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.410000] TCP: reno registered
[    0.410000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.410000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.420000] NET: Registered protocol family 1
[    0.420000] Unpacking initramfs...
[    7.370000] Freeing initrd memory: 3376K (7cb4000 - 8000000)
[    7.390000] VFS: Disk quotas dquot_6.5.2
[    7.390000] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    7.390000] msgmni has been set to 247
[    7.410000] alg: No test for stdrng (krng)
[    7.410000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    7.410000] io scheduler noop registered (default)
[    7.640000] Console: switching to colour frame buffer device 80x25
[    7.680000] fb0: Amiga AGA frame buffer device, using 1280K of video memory
[    7.690000] atafb_init: start
[    7.700000] pmac_zilog: 0.6 (Benjamin Herrenschmidt <benh@kernel.crashing.org>)
[    7.710000] Amiga-builtin serial driver version 4.30
[    7.720000] ttyS0 is the amiga builtin serial port
[    7.740000] Zorro: Probing AutoConfig expansion devices: 3 devices
[    7.750000] cirrusfb 00: CL Picasso4 board detected, REG at 0x40600000, 4 MiB RAM at 0x41000000
[    7.760000] cirrusfb 00: Cirrus Logic chipset on Zorro bus, RAM (4 MiB) at 0x41000000
[    7.790000] mousedev: PS/2 mouse device common for all mice
[    7.810000] input: amiga-keyboard as /devices/platform/amiga-keyboard/input/input0
[    7.820000] rtc-rp5c01 rtc-rp5c01: rtc core: registered rtc-rp5c01 as rtc0
[    7.830000] TCP: cubic registered
[    7.840000] NET: Registered protocol family 17
[    7.860000] registered taskstats version 1
[    7.870000] rtc-rp5c01 rtc-rp5c01: setting system clock to 2013-07-31 07:34:29 UTC (1375256069)
[    7.880000] Freeing unused kernel memory: 140K (2ca000 - 2ed000)
[    9.730000] udevd[43]: starting version 175
[   11.210000] FD: probing units
[   11.210000] found fd0 
[   11.490000] Uniform Multi-Platform E-IDE driver
[   12.160000] ide: Gayle IDE controller (A4000 style)
[   12.170000] Probing IDE interface ide0...
[   12.870000] eth0: X-Surf at 0x00e90000, Ethernet Address 00:c0:f0:51:c1:21
[   12.890000] hda: SAMSUNG SP1614N, ATA DISK drive
[   13.140000] Z2RAM: using 0K Zorro II RAM and 384K Chip RAM (Total 384K)
[   13.620000] ide0 at 0x80dd2020 on irq 2 (serialized)
[   16.160000] ide-gd driver 1.18
[   16.180000] hda: max request size: 512KiB
[   16.240000] hda: 312581808 sectors (160041 MB) w/8192KiB Cache, CHS=19457/255/63
[   16.250000] hda: cache flushes supported
[   16.290000]  hda: RDSK (512) hda1 (DOS^C)(res 2 spb 1) hda2 (DOS^C)(res 2 spb 1) hda3 (LNX^@)(res 2 spb 1) hda4 (LNX^@)(res 2 spb 1)
[   23.970000] kjournald starting.  Commit interval 5 seconds
[   23.980000] EXT3-fs (hda3): mounted filesystem with ordered data mode
[   42.590000] udevd[231]: starting version 175
[   48.410000] input: amiga-mouse as /devices/platform/amiga-mouse/input/input1
[   49.370000] parport0: Amiga built-in port using irq
[   49.620000] parport0: fix this legacy no-device port driver!
[   50.160000] Amiga DMA sound driver rev 016 installed
[   50.170000] Core driver edition 01.06 : AMIGA driver edition 00.04
[   50.180000] Write will use    4 fragments of   32768 bytes as default
[   67.800000] device-mapper: uevent: version 1.0.3
[   67.830000] device-mapper: ioctl: 4.24.0-ioctl (2013-01-15) initialised: dm-devel@redhat.com
[   71.460000] bio: create slab <bio-1> at 1
[   78.770000] Adding 4194300k swap on /dev/mapper/crest-swap.  Priority:-1 extents:1 across:4194300k 
[  233.150000] EXT3-fs (hda3): using internal journal
[  254.150000] loop: module loaded
[  260.910000] EXT4-fs (dm-1): mounted filesystem with ordered data mode. Opts: (null)
[  261.010000] EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: (null)
[  261.170000] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: (null)
[  282.410000] FS-Cache: Loaded
[  282.460000] Key type dns_resolver registered
[  282.830000] RPC: Registered named UNIX socket transport module.
[  282.840000] RPC: Registered udp transport module.
[  282.850000] RPC: Registered tcp transport module.
[  282.860000] RPC: Registered tcp NFSv4.1 backchannel transport module.
[  283.320000] FS-Cache: Netfs 'nfs' registered for caching
[  288.420000] NET: Registered protocol family 10

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

* Re: linux 3.10.1 with initrd
  2013-07-31  9:01                 ` linux 3.10.1 with initrd Christian T. Steigies
@ 2013-07-31 11:57                   ` Thorsten Glaser
  0 siblings, 0 replies; 9+ messages in thread
From: Thorsten Glaser @ 2013-07-31 11:57 UTC (permalink / raw)
  To: Christian T. Steigies; +Cc: Debian m68k, Linux/m68k

Christian T. Steigies dixit:

>Not sure if this is the correct thread, but crest is working with your new
>kernel, without using a memfile!

Yesss! Cool! Thanks for confirming!

>The only thing that does not work seems to
>be nfs so far...

Did you load all relevant modules? We’re _heavily_ modularised now.

>Is gcc-4.8 now the default compiler for all buildds?

Since gcc-defaults_1.122 or something like that, gcc-4.8 is the
default for the m68k platform as for all others. We have one
default gcc version per Debian architecture, not per buildd,
which is also what regular _users_ get when they install e.g.
the gcc or gobjc package. Ideally we’d even have only one default
compiler in all of Debian…

Anyway, the switch was overdue, and gcc-4.7 wasn’t really tested
either and Doko said he’d remove gcc-4.6 soon (maybe except GNAT).

bye,
//mirabilos
-- 
13:22⎜«neurodamage» mira, what's up man? I have a CVS question for you in #cvs
13:22⎜«neurodamage» since you're so good w. it │ «neurodamage:#cvs» i love you
13:28⎜«neurodamage:#cvs» you're a handy guy to have around for systems stuff ☺
16:06⎜<Draget:#cvs> Thank god I found you =)   20:03│«bioe007:#cvs» mira2k: ty
17:14⎜<ldiain:#cvs> Thanks big help you are :-)   <bioe007> mira|nwt: ty again
18:35⎜«alturiak:#cvs» mirabilos: aw, nice. thanks :o
18:36⎜«ThunderChicken:#cvs» mirabilos FTW!  23:03⎜«mithraic:#cvs» aaah. thanks
18:41⎜«alturiak:#cvs» phew. thanks a bunch, guys. you just made my weekend :-)
18:10⎜«sumit:#cvs» mirabilos: oh ok.. thanks for that
21:57⎜<bhuey:#cvs> yeah, I really appreciate help
18:50⎜«grndlvl:#cvs» thankyou            18:50⎜«grndlvl:#cvs» worked perfectly
20:50⎜<paolo:#cvs> i see. mirabilos, thnks for your support
00:36⎜«halirutan:#cvs» ok, the obvious way:-) thx
18:44⎜«arcfide:#cvs» mirabilos, I am running OpenBSD.     18:59⎜«arcfide:#cvs»
Hrm, yes, I see what you mean. 19:01⎜«arcfide:#cvs» Yeah, thanks for the help.
21:33⎜«CardinalFang:#cvs» Ugh.  Okay.  Sorry for the dumb question.  Thank you
21:34⎜<centosian:#cvs> mirabilos: whoa that's sweet
21:52⎜«garrett__:#cvs» much appreciated  «garrett__:#cvs» thanks for your time
23:39⎜<symons:#cvs> this worked, thank you very much 16:26⎜<schweizer:#cvs> ok
thx, i'll try that     20:00⎜«stableable:#cvs» Thank you.    20:50⎜«s833:#cvs»
mirabilos: thanks a lot.        19:34⎜<bobbytek:#cvs> Thanks for confirming :)
20:08⎜<tsolox:#cvs> ...works like a charm.. thanks mirabilos

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

* Re: linux 3.10.1 with initrd (was Re: linux 3.8.12-1 (atari flavour) does not boot)
  2013-07-31  8:39               ` linux 3.10.1 with initrd (was Re: linux 3.8.12-1 (atari flavour) does not boot) Geert Uytterhoeven
  2013-07-31  9:01                 ` linux 3.10.1 with initrd Christian T. Steigies
@ 2013-08-02  9:08                 ` Michael Schmitz
  2013-08-02 13:01                   ` Geert Uytterhoeven
  1 sibling, 1 reply; 9+ messages in thread
From: Michael Schmitz @ 2013-08-02  9:08 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Mikael Pettersson, Thorsten Glaser, Linux/m68k, Debian m68k

[-- Attachment #1: Type: text/plain, Size: 2343 bytes --]

Hi Geert,

>> [    0.160000] WARNING: at /root/linux-3.10.1/init/main.c:698  
>> do_one_initcall+0x12e/0x13a()
>> [    0.160000] initcall param_sysfs_init+0x0/0x1a4 returned with  
>> disabled interrupts
>>
>> This seems to happen for several initcalls. Geert et al,
>> can you have a look at them, they’re scary ☺
>
> It only happens on multi-platform kernels, because of the following  
> definition
> of ALLOWINT:
>
> #if defined(MACH_ATARI_ONLY)
>         /* block out HSYNC = ipl 2 on the atari */
> #define ALLOWINT        (~0x500)
> #else
>         /* portable version */
> #define ALLOWINT        (~0x700)
> #endif /* machine compilation types */
>
> On an Atari-only kernel, flags is either 0x00c02204 or 0x00c02214.
> Hence "flags & ~ALLOWINT" is "flags & 0x500" is always zero.
>
> On a multi-platform kernel, flags is one of 0x00c02004, 0x00c02014,
> 0x00c02204, or 0x00c02214.
> Hence "flags & ~ALLOWINT" is "flags & 0x700" is sometimes non-zero,
> triggering the warning.
>
> Anyone who sees a solution that doesn't involve adding a variable to  
> hold
> ALLOWINT?
>
> We're already having a check for Q40 in arch_local_irq_enable()
> (in multi-platfom kernels only).

Didn't we have that sorted out earlier? I seem to recall this has  
surfaced before.

What is the cause of the problem exactly - the hsync handler changing  
the IPL to block out further interrupts, whenever it is called for the  
first time after interrupts are enabled? We could stop doing that on  
multi-platform kernels (taking all hsync interrupts will be a  
performance hit but not stop the system from working).

Cheers,

	Michael


>
> Gr{oetje,eeting}s,
>
>                         Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 --  
> geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a  
> hacker. But
> when I'm talking to journalists I just say "programmer" or something  
> like that.
>                                 -- Linus Torvalds
>
>
> --
> To UNSUBSCRIBE, email to debian-68k-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact  
> listmaster@lists.debian.org
> Archive:  
> http://lists.debian.org/ 
> CAMuHMdVj_xZWYc1Cszun0F6Xrrz0=e_EJN4b1cqdbcRqgC7ABg@mail.gmail.com

[-- Attachment #2: Type: text/enriched, Size: 2448 bytes --]

Hi Geert,


<excerpt><excerpt>[    0.160000] WARNING: at
/root/linux-3.10.1/init/main.c:698 do_one_initcall+0x12e/0x13a()

[    0.160000] initcall param_sysfs_init+0x0/0x1a4 returned with
disabled interrupts


This seems to happen for several initcalls. Geert et al,

can you have a look at them, they’re scary
<fontfamily><param>OpenSymbol</param>☺

</fontfamily></excerpt><fontfamily><param>OpenSymbol</param>

</fontfamily>It only happens on multi-platform kernels, because of the
following definition

of ALLOWINT:


#if defined(MACH_ATARI_ONLY)

        /* block out HSYNC = ipl 2 on the atari */

#define ALLOWINT        (~0x500)

#else

        /* portable version */

#define ALLOWINT        (~0x700)

#endif /* machine compilation types */


On an Atari-only kernel, flags is either 0x00c02204 or 0x00c02214.

Hence "flags & ~ALLOWINT" is "flags & 0x500" is always zero.


On a multi-platform kernel, flags is one of 0x00c02004, 0x00c02014,

0x00c02204, or 0x00c02214.

Hence "flags & ~ALLOWINT" is "flags & 0x700" is sometimes non-zero,

triggering the warning.


Anyone who sees a solution that doesn't involve adding a variable to
hold

ALLOWINT?


We're already having a check for Q40 in arch_local_irq_enable()

(in multi-platfom kernels only).

</excerpt>

Didn't we have that sorted out earlier? I seem to recall this has
surfaced before. 


What is the cause of the problem exactly - the hsync handler changing
the IPL to block out further interrupts, whenever it is called for the
first time after interrupts are enabled? We could stop doing that on
multi-platform kernels (taking all hsync interrupts will be a
performance hit but not stop the system from working). 


Cheers,


	Michael



<excerpt>

Gr{oetje,eeting}s,


                        Geert


--

Geert Uytterhoeven -- There's lots of Linux beyond ia32 --
geert@linux-m68k.org


In personal conversations with technical people, I call myself a
hacker. But

when I'm talking to journalists I just say "programmer" or something
like that.

                                -- Linus Torvalds



--

To UNSUBSCRIBE, email to debian-68k-REQUEST@lists.debian.org

with a subject of "unsubscribe". Trouble? Contact
listmaster@lists.debian.org

Archive:
http://lists.debian.org/CAMuHMdVj_xZWYc1Cszun0F6Xrrz0=e_EJN4b1cqdbcRqgC7ABg@mail.gmail.com

</excerpt>

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

* Re: linux 3.10.1 with initrd (was Re: linux 3.8.12-1 (atari flavour) does not boot)
  2013-08-02  9:08                 ` linux 3.10.1 with initrd (was Re: linux 3.8.12-1 (atari flavour) does not boot) Michael Schmitz
@ 2013-08-02 13:01                   ` Geert Uytterhoeven
  2013-08-02 17:26                     ` Michael Schmitz
  0 siblings, 1 reply; 9+ messages in thread
From: Geert Uytterhoeven @ 2013-08-02 13:01 UTC (permalink / raw)
  To: Michael Schmitz
  Cc: Mikael Pettersson, Thorsten Glaser, Linux/m68k, Debian m68k

On Fri, Aug 2, 2013 at 11:08 AM, Michael Schmitz
<schmitz@biophys.uni-duesseldorf.de> wrote:
>>> [    0.160000] WARNING: at /root/linux-3.10.1/init/main.c:698
>>> do_one_initcall+0x12e/0x13a()
>>> [    0.160000] initcall param_sysfs_init+0x0/0x1a4 returned with disabled
>>> interrupts
>>>
>>> This seems to happen for several initcalls. Geert et al,
>>> can you have a look at them, they’re scary ☺
>>
>>
>> It only happens on multi-platform kernels, because of the following
>> definition
>> of ALLOWINT:
>>
>> #if defined(MACH_ATARI_ONLY)
>>         /* block out HSYNC = ipl 2 on the atari */
>> #define ALLOWINT        (~0x500)
>> #else
>>         /* portable version */
>> #define ALLOWINT        (~0x700)
>> #endif /* machine compilation types */
>>
>> On an Atari-only kernel, flags is either 0x00c02204 or 0x00c02214.
>> Hence "flags & ~ALLOWINT" is "flags & 0x500" is always zero.
>>
>> On a multi-platform kernel, flags is one of 0x00c02004, 0x00c02014,
>> 0x00c02204, or 0x00c02214.
>> Hence "flags & ~ALLOWINT" is "flags & 0x700" is sometimes non-zero,
>> triggering the warning.
>>
>> Anyone who sees a solution that doesn't involve adding a variable to hold
>> ALLOWINT?
>>
>> We're already having a check for Q40 in arch_local_irq_enable()
>> (in multi-platfom kernels only).
>
>
> Didn't we have that sorted out earlier? I seem to recall this has surfaced
> before.

You mean commit 94674cd5299e825cb31979c3b9a4c1a3e6074839
("m68k: Correct the Atari ALLOWINT definition")? That was a related but
slightly different problem.

> What is the cause of the problem exactly - the hsync handler changing the
> IPL to block out further interrupts, whenever it is called for the first
> time after interrupts are enabled? We could stop doing that on
> multi-platform kernels (taking all hsync interrupts will be a performance
> hit but not stop the system from working).

AFAICS, it's indeed the hsync handler blocking further interrupts on
multi-platform kernels.

On multi-platform kernels, enabling interrupts enables all 7 levels
(interrupt enable/disable is either all-or-nothing in Linux, there are
no priorities).
When the hblank interrupt comes in, its handler (falcon_hblhandler())
disables level 2 interrupts again, to prevent more interrupts coming in,
which would slow down the system.
However, this causes arch_irqs_disabled_flags() to think interrupts are
completely disabled, causing the warnings in the logs.

We could ignore IPL2 when running on Atari (untested whitespace-damaged
patch):

--- a/arch/m68k/include/asm/irqflags.h
+++ b/arch/m68k/include/asm/irqflags.h
@@ -67,7 +67,11 @@ static inline void arch_local_irq_restore(unsigned long flags

 static inline bool arch_irqs_disabled_flags(unsigned long flags)
 {
-       return (flags & ~ALLOWINT) != 0;
+       if (MACH_IS_ATARI) {
+               /* Ignore HSYNC = ipl 2 on Atari */
+               return (flags & ~(ALLOWINT | 0x200)) != 0;
+       } else
+           return (flags & ~ALLOWINT) != 0;
 }

 static inline bool arch_irqs_disabled(void)

or just ignore all priorities on all platforms, and consider interrupts disabled
iff all priorities are disabled:

--- a/arch/m68k/include/asm/irqflags.h
+++ b/arch/m68k/include/asm/irqflags.h
@@ -67,7 +67,7 @@ static inline void arch_local_irq_restore(unsigned long flags

 static inline bool arch_irqs_disabled_flags(unsigned long flags)
 {
-       return (flags & ~ALLOWINT) != 0;
+       return (flags & ~ALLOWINT) != ~ALLOWINT;
 }

 static inline bool arch_irqs_disabled(void)

The former is safer but slower, the second is faster but will miss cases
where some interrupt priorities are disabled.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: linux 3.10.1 with initrd (was Re: linux 3.8.12-1 (atari flavour) does not boot)
  2013-08-02 13:01                   ` Geert Uytterhoeven
@ 2013-08-02 17:26                     ` Michael Schmitz
  2013-08-02 19:58                       ` Geert Uytterhoeven
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Schmitz @ 2013-08-02 17:26 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Michael Schmitz, Mikael Pettersson, Thorsten Glaser, Linux/m68k,
	Debian m68k

Hi Geert,
>>
>> Didn't we have that sorted out earlier? I seem to recall this has surfaced
>> before.
> You mean commit 94674cd5299e825cb31979c3b9a4c1a3e6074839
> ("m68k: Correct the Atari ALLOWINT definition")? That was a related but
> slightly different problem.

That's proably what I recalled, yes.
>> What is the cause of the problem exactly - the hsync handler changing the
>> IPL to block out further interrupts, whenever it is called for the first
>> time after interrupts are enabled? We could stop doing that on
>> multi-platform kernels (taking all hsync interrupts will be a performance
>> hit but not stop the system from working).
> AFAICS, it's indeed the hsync handler blocking further interrupts on
> multi-platform kernels.

So we could stop blocking further interrupts in multi platform kernels. 
How much of a performance hit will this be on say a stock Falcon or TT?

>
> We could ignore IPL2 when running on Atari (untested whitespace-damaged
> patch):
>
> --- a/arch/m68k/include/asm/irqflags.h
> +++ b/arch/m68k/include/asm/irqflags.h
> @@ -67,7 +67,11 @@ static inline void arch_local_irq_restore(unsigned long flags
>
>   static inline bool arch_irqs_disabled_flags(unsigned long flags)
>   {
> -       return (flags & ~ALLOWINT) != 0;
> +       if (MACH_IS_ATARI) {
> +               /* Ignore HSYNC = ipl 2 on Atari */
> +               return (flags & ~(ALLOWINT | 0x200)) != 0;
> +       } else
> +           return (flags & ~ALLOWINT) != 0;
>   }
>
>   static inline bool arch_irqs_disabled(void)
>
> or just ignore all priorities on all platforms, and consider interrupts disabled
> iff all priorities are disabled:
>
> --- a/arch/m68k/include/asm/irqflags.h
> +++ b/arch/m68k/include/asm/irqflags.h
> @@ -67,7 +67,7 @@ static inline void arch_local_irq_restore(unsigned long flags
>
>   static inline bool arch_irqs_disabled_flags(unsigned long flags)
>   {
> -       return (flags & ~ALLOWINT) != 0;
> +       return (flags & ~ALLOWINT) != ~ALLOWINT;
>   }
>
>   static inline bool arch_irqs_disabled(void)
>
> The former is safer but slower, the second is faster but will miss cases
> where some interrupt priorities are disabled.
The safer but slower option (we can still use the fast version of it on 
single platform kernels). We should test the faster at any rate to see 
whether there are really cases where we miss disabled interrupts.

I'll revive my Falcon already ...

Cheers,

     Michael

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

* Re: linux 3.10.1 with initrd (was Re: linux 3.8.12-1 (atari flavour) does not boot)
  2013-08-02 17:26                     ` Michael Schmitz
@ 2013-08-02 19:58                       ` Geert Uytterhoeven
  2013-08-03  1:37                         ` Michael Schmitz
  0 siblings, 1 reply; 9+ messages in thread
From: Geert Uytterhoeven @ 2013-08-02 19:58 UTC (permalink / raw)
  To: Michael Schmitz
  Cc: Michael Schmitz, Mikael Pettersson, Thorsten Glaser, Linux/m68k,
	Debian m68k

On Fri, Aug 2, 2013 at 7:26 PM, Michael Schmitz <schmitzmic@gmail.com> wrote:
>>> What is the cause of the problem exactly - the hsync handler changing the
>>> IPL to block out further interrupts, whenever it is called for the first
>>> time after interrupts are enabled? We could stop doing that on
>>> multi-platform kernels (taking all hsync interrupts will be a performance
>>> hit but not stop the system from working).
>>
>> AFAICS, it's indeed the hsync handler blocking further interrupts on
>> multi-platform kernels.
>
> So we could stop blocking further interrupts in multi platform kernels. How
> much of a performance hit will this be on say a stock Falcon or TT?

That's 15000 - 30000 more interrupts per second.

>> We could ignore IPL2 when running on Atari (untested whitespace-damaged
>> patch):

[...]

>> or just ignore all priorities on all platforms, and consider interrupts
>> disabled
>> iff all priorities are disabled:

>> The former is safer but slower, the second is faster but will miss cases
>> where some interrupt priorities are disabled.
>
> The safer but slower option (we can still use the fast version of it on
> single platform kernels). We should test the faster at any rate to see
> whether there are really cases where we miss disabled interrupts.

On single-platform kernels, ALLOWINT = ~0x500, and we can use the
current (fast) version.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: linux 3.10.1 with initrd (was Re: linux 3.8.12-1 (atari flavour) does not boot)
  2013-08-02 19:58                       ` Geert Uytterhoeven
@ 2013-08-03  1:37                         ` Michael Schmitz
  2013-08-03  8:05                           ` Geert Uytterhoeven
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Schmitz @ 2013-08-03  1:37 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Michael Schmitz, Mikael Pettersson, Thorsten Glaser, Linux/m68k,
	Debian m68k

Geert,
>> So we could stop blocking further interrupts in multi platform kernels. How
>> much of a performance hit will this be on say a stock Falcon or TT?
> That's 15000 - 30000 more interrupts per second.
Yep, but pretty much all NOP. Is the interrupt entry/return that much of 
a hassle these days?
>>> The former is safer but slower, the second is faster but will miss cases
>>> where some interrupt priorities are disabled.
>> The safer but slower option (we can still use the fast version of it on
>> single platform kernels). We should test the faster at any rate to see
>> whether there are really cases where we miss disabled interrupts.
> On single-platform kernels, ALLOWINT = ~0x500, and we can use the
> current (fast) version.

I meant to say that - we can use the current version on single platform 
kernels:

  static inline bool arch_irqs_disabled_flags(unsigned long flags)
  {
+ #if defined(MACH_ATARI_ONLY) || defined(MACH_AMIGA_ONLY)
         return (flags & ~ALLOWINT) != 0;
+ #else
+       if (MACH_IS_ATARI) {
+               /* Ignore HSYNC = ipl 2 on Atari */
+               return (flags & ~(ALLOWINT | 0x200)) != 0;
+       } else
+           return (flags & ~ALLOWINT) != 0;
+ #endif
  }


(or whatever compiler flag we have to indicate we're not building a 
multi-platform kernel)

Cheers,

     Michael

>
> Gr{oetje,eeting}s,
>
>                          Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                  -- Linus Torvalds

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

* Re: linux 3.10.1 with initrd (was Re: linux 3.8.12-1 (atari flavour) does not boot)
  2013-08-03  1:37                         ` Michael Schmitz
@ 2013-08-03  8:05                           ` Geert Uytterhoeven
  0 siblings, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2013-08-03  8:05 UTC (permalink / raw)
  To: Michael Schmitz
  Cc: Michael Schmitz, Mikael Pettersson, Thorsten Glaser, Linux/m68k,
	Debian m68k

On Sat, Aug 3, 2013 at 3:37 AM, Michael Schmitz <schmitzmic@gmail.com> wrote:
>  static inline bool arch_irqs_disabled_flags(unsigned long flags)
>  {
> + #if defined(MACH_ATARI_ONLY) || defined(MACH_AMIGA_ONLY)

The above is not needed:
  - If MACH_ATARI_ONLY, MACH_IS_ATARI is hardcoded to 1, so the
    compiler will optimize-away the else part. In that case,
    "ALLOWINT | 0x200" == "ALLOWINT".
  - If MACH_AMIGA_ONLY, MACH_IS_ATARI is hardcoded to 0, and
    the compiler will optimize-away the other part.

>
>         return (flags & ~ALLOWINT) != 0;
> + #else
>
> +       if (MACH_IS_ATARI) {
> +               /* Ignore HSYNC = ipl 2 on Atari */
> +               return (flags & ~(ALLOWINT | 0x200)) != 0;
> +       } else
> +           return (flags & ~ALLOWINT) != 0;
> + #endif
>  }
>
>
> (or whatever compiler flag we have to indicate we're not building a
> multi-platform kernel)

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, other threads:[~2013-08-03  8:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <alpine.DEB.2.02.1305132122190.14304@tglase.lan.tarent.de>
     [not found] ` <CAMuHMdX+t0=J+8a1JoF6Jf=gO_ROuL_kgAVjF0DJA-cgPGp_Ng@mail.gmail.com>
     [not found]   ` <Pine.BSM.4.64L.1305132126170.11828@herc.mirbsd.org>
     [not found]     ` <5192331E.9010009@debian.org>
     [not found]       ` <Pine.BSM.4.64L.1305141338580.14676@herc.mirbsd.org>
     [not found]         ` <20130514144112.GH11842@chumley.earth.sol>
     [not found]           ` <Pine.BSM.4.64L.1305141642360.9568@herc.mirbsd.org>
     [not found]             ` <Pine.BSM.4.64L.1307201716460.31890@herc.mirbsd.org>
2013-07-31  8:39               ` linux 3.10.1 with initrd (was Re: linux 3.8.12-1 (atari flavour) does not boot) Geert Uytterhoeven
2013-07-31  9:01                 ` linux 3.10.1 with initrd Christian T. Steigies
2013-07-31 11:57                   ` Thorsten Glaser
2013-08-02  9:08                 ` linux 3.10.1 with initrd (was Re: linux 3.8.12-1 (atari flavour) does not boot) Michael Schmitz
2013-08-02 13:01                   ` Geert Uytterhoeven
2013-08-02 17:26                     ` Michael Schmitz
2013-08-02 19:58                       ` Geert Uytterhoeven
2013-08-03  1:37                         ` Michael Schmitz
2013-08-03  8:05                           ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox