[patch 00/18] m68k patches for 2.6.28 - Kernel

This is a discussion on [patch 00/18] m68k patches for 2.6.28 - Kernel ; Hi Linus, Here are the m68k patches I had queued up for the 2.6.28 merge window: [01] [PATCH] m68k: use bcd2bin/bin2bcd [02] [PATCH] m68k: Use new printk() extension %pS to print symbols [03] [PATCH] m68k: Put .bss at the end ...

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 21

Thread: [patch 00/18] m68k patches for 2.6.28

  1. [patch 00/18] m68k patches for 2.6.28

    Hi Linus,

    Here are the m68k patches I had queued up for the 2.6.28 merge window:
    [01] [PATCH] m68k: use bcd2bin/bin2bcd
    [02] [PATCH] m68k: Use new printk() extension %pS to print symbols
    [03] [PATCH] m68k: Put .bss at the end of the data section
    [04] [PATCH] m68k: Add NOTES to init data so it's discarded at boot
    [05] [PATCH] m68k: Reverse platform MMU logic so Sun 3 is last
    [06] [PATCH] m68k: Disable Amiga serial console support if modular
    [07] [PATCH] m68k: Modular Amiga keyboard needs key_maps
    [08] [PATCH] m68k: Remove unused atari_kbd_translate()
    [09] [PATCH] m68k: Define rtc_lock on Atari
    [10] [PATCH] m68k: Add missing dma_sync_single_range_for_{cpu,device}()
    [11] [PATCH] m68k: needs
    [12] [PATCH] HP input: kill warnings due to suseconds_t differences
    [13] [PATCH] m68k: Remove the broken Hades support
    [14] [PATCH] m68k: remove the dead PCI code
    [15] [PATCH] m68k: init_irq_proc depends on CONFIG_PROC_FS
    [16] [PATCH] m68k: Atari SCSI needs NVRAM
    [17] [PATCH] net/rfkill/rfkill-input.c needs
    [18] [PATCH] arch/m68k/mm/kmap.c: introduce missing kfree

    All of them have been reviewed before.
    All of them (except for the last one) have been braising in linux-next for
    a while.

    Thanks for applying!

    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 from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. [patch 09/18] m68k: Define rtc_lock on Atari

    From: Geert Uytterhoeven

    The nvram and rtc-cmos drivers use the spinlock rtc_lock to protect against
    concurrent accesses to the CMOS memory. As m68k doesn't support SMP or preempt
    yet, the spinlock calls tend to get optimized away, but not for all
    configurations, causing in some rare cases:

    | ERROR: "rtc_lock" [drivers/rtc/rtc-cmos.ko] undefined!
    | ERROR: "rtc_lock" [drivers/char/nvram.ko] undefined!

    Add the spinlock to the Atari core code to avoid this.

    Signed-off-by: Geert Uytterhoeven
    Acked-by: Michael Schmitz
    ---
    arch/m68k/atari/time.c | 3 +++
    1 file changed, 3 insertions(+)

    --- a/arch/m68k/atari/time.c
    +++ b/arch/m68k/atari/time.c
    @@ -20,6 +20,9 @@

    #include

    +DEFINE_SPINLOCK(rtc_lock);
    +EXPORT_SYMBOL_GPL(rtc_lock);
    +
    void __init
    atari_sched_init(irq_handler_t timer_routine)
    {

    --
    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 from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  3. [patch 16/18] m68k: Atari SCSI needs NVRAM

    From: Geert Uytterhoeven

    ERROR: "nvram_read_byte" [drivers/scsi/atari_scsi.ko] undefined!
    ERROR: "nvram_check_checksum" [drivers/scsi/atari_scsi.ko] undefined!

    Signed-off-by: Geert Uytterhoeven
    ---
    drivers/scsi/Kconfig | 1 +
    1 file changed, 1 insertion(+)

    --- a/drivers/scsi/Kconfig
    +++ b/drivers/scsi/Kconfig
    @@ -1640,6 +1640,7 @@ config ATARI_SCSI
    tristate "Atari native SCSI support"
    depends on ATARI && SCSI
    select SCSI_SPI_ATTRS
    + select NVRAM
    ---help---
    If you have an Atari with built-in NCR5380 SCSI controller (TT,
    Falcon, ...) say Y to get it supported. Of course also, if you have

    --
    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 from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  4. [patch 11/18] m68k: <asm/pci.h> needs <asm-generic/pci-dma-compat.h>

    From: Geert Uytterhoeven

    Several multi-bus subsystems:

    | include/linux/ssb/ssb.h: In function 'ssb_dma_mapping_error':
    | include/linux/ssb/ssb.h:430: error: implicit declaration of function 'pci_dma_mapping_error'
    | include/linux/ssb/ssb.h: In function 'ssb_dma_map_single':
    | include/linux/ssb/ssb.h:444: error: implicit declaration of function 'pci_map_single'
    | include/linux/ssb/ssb.h: In function 'ssb_dma_unmap_single':
    | include/linux/ssb/ssb.h:458: error: implicit declaration of function 'pci_unmap_single'
    | include/linux/ssb/ssb.h: In function 'ssb_dma_sync_single_for_cpu':
    | include/linux/ssb/ssb.h:475: error: implicit declaration of function 'pci_dma_sync_single_for_cpu'
    | include/linux/ssb/ssb.h: In function 'ssb_dma_sync_single_for_device':
    | include/linux/ssb/ssb.h:493: error: implicit declaration of function 'pci_dma_sync_single_for_device'

    or legacy drivers:

    | drivers/net/hp100.c: In function 'pdl_map_data':
    | drivers/net/hp100.c:291: error: implicit declaration of function 'pci_map_single'
    | drivers/net/hp100.c: In function 'hp100_probe1':
    | drivers/net/hp100.c:707: error: implicit declaration of function 'pci_alloc_consistent'
    | drivers/net/hp100.c:782: error: implicit declaration of function 'pci_free_consistent'
    | drivers/net/hp100.c: In function 'hp100_clean_txring':
    | drivers/net/hp100.c:1614: error: implicit declaration of function 'pci_unmap_single'

    and

    | drivers/scsi/aic7xxx_old.c: In function 'aic7xxx_allocate_scb':
    | drivers/scsi/aic7xxx_old.c:2573: error: implicit declaration of function 'pci_alloc_consistent'
    | drivers/scsi/aic7xxx_old.c: In function 'aic7xxx_done':
    | drivers/scsi/aic7xxx_old.c:2697: error: implicit declaration of function 'pci_unmap_single'
    | drivers/scsi/aic7xxx_old.c: In function 'aic7xxx_handle_seqint':
    | drivers/scsi/aic7xxx_old.c:4275: error: implicit declaration of function 'pci_map_single'
    | drivers/scsi/aic7xxx_old.c: In function 'aic7xxx_free':
    | drivers/scsi/aic7xxx_old.c:8460: error: implicit declaration of function 'pci_free_consistent'

    rely on PCI DMA operations to be always available.

    Add #include to to make them happy.

    Signed-off-by: Geert Uytterhoeven
    ---
    include/asm-m68k/pci.h | 1 +
    1 file changed, 1 insertion(+)

    --- a/include/asm-m68k/pci.h
    +++ b/include/asm-m68k/pci.h
    @@ -8,6 +8,7 @@
    */

    #include
    +#include

    struct pci_ops;


    --
    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 from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  5. [patch 12/18] HP input: kill warnings due to suseconds_t differences

    From: Geert Uytterhoeven

    Kill compiler warnings related to printf() formats in the input drivers for
    various HP9000 machines, which are shared between PA-RISC (suseconds_t is int)
    and m68k (suseconds_t is long). As both are 32-bit, it's safe to cast to int.

    Signed-off-by: Geert Uytterhoeven
    Acked-by: Helge Deller
    ---
    drivers/input/misc/hp_sdc_rtc.c | 10 +++++-----
    drivers/input/serio/hp_sdc.c | 2 +-
    2 files changed, 6 insertions(+), 6 deletions(-)

    --- a/drivers/input/misc/hp_sdc_rtc.c
    +++ b/drivers/input/misc/hp_sdc_rtc.c
    @@ -458,35 +458,35 @@ static int hp_sdc_rtc_proc_output (char
    p += sprintf(p, "i8042 rtc\t: READ FAILED!\n");
    } else {
    p += sprintf(p, "i8042 rtc\t: %ld.%02d seconds\n",
    - tv.tv_sec, tv.tv_usec/1000);
    + tv.tv_sec, (int)tv.tv_usec/1000);
    }

    if (hp_sdc_rtc_read_fhs(&tv)) {
    p += sprintf(p, "handshake\t: READ FAILED!\n");
    } else {
    p += sprintf(p, "handshake\t: %ld.%02d seconds\n",
    - tv.tv_sec, tv.tv_usec/1000);
    + tv.tv_sec, (int)tv.tv_usec/1000);
    }

    if (hp_sdc_rtc_read_mt(&tv)) {
    p += sprintf(p, "alarm\t\t: READ FAILED!\n");
    } else {
    p += sprintf(p, "alarm\t\t: %ld.%02d seconds\n",
    - tv.tv_sec, tv.tv_usec/1000);
    + tv.tv_sec, (int)tv.tv_usec/1000);
    }

    if (hp_sdc_rtc_read_dt(&tv)) {
    p += sprintf(p, "delay\t\t: READ FAILED!\n");
    } else {
    p += sprintf(p, "delay\t\t: %ld.%02d seconds\n",
    - tv.tv_sec, tv.tv_usec/1000);
    + tv.tv_sec, (int)tv.tv_usec/1000);
    }

    if (hp_sdc_rtc_read_ct(&tv)) {
    p += sprintf(p, "periodic\t: READ FAILED!\n");
    } else {
    p += sprintf(p, "periodic\t: %ld.%02d seconds\n",
    - tv.tv_sec, tv.tv_usec/1000);
    + tv.tv_sec, (int)tv.tv_usec/1000);
    }

    p += sprintf(p,
    --- a/drivers/input/serio/hp_sdc.c
    +++ b/drivers/input/serio/hp_sdc.c
    @@ -323,7 +323,7 @@ static void hp_sdc_tasklet(unsigned long
    * it back to the application. and be less verbose.
    */
    printk(KERN_WARNING PREFIX "read timeout (%ius)!\n",
    - tv.tv_usec - hp_sdc.rtv.tv_usec);
    + (int)(tv.tv_usec - hp_sdc.rtv.tv_usec));
    curr->idx += hp_sdc.rqty;
    hp_sdc.rqty = 0;
    tmp = curr->seq[curr->actidx];

    --
    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 from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  6. [patch 13/18] m68k: Remove the broken Hades support

    From: Adrian Bunk

    This patch removes the Hades support that was marked as BROKEN 5 years ago.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Geert Uytterhoeven
    ---

    arch/m68k/Kconfig | 13 -
    arch/m68k/atari/Makefile | 3
    arch/m68k/atari/ataints.c | 6
    arch/m68k/atari/config.c | 37 +--
    arch/m68k/atari/hades-pci.c | 440 --------------------------------------
    arch/m68k/kernel/bios32.c | 6
    arch/m68k/kernel/process.c | 2
    drivers/block/ataflop.c | 4
    drivers/scsi/Kconfig | 8
    drivers/scsi/atari_dma_emul.c | 468 -----------------------------------------
    drivers/scsi/atari_scsi.c | 27 --
    include/asm-m68k/atarihw.h | 1
    include/asm-m68k/entry.h | 2
    include/asm-m68k/virtconvert.h | 6
    14 files changed, 23 insertions(+), 1000 deletions(-)

    d9b251e93344e93aace1d7dadc235b4a4aa8c3b2
    --- a/arch/m68k/Kconfig
    +++ b/arch/m68k/Kconfig
    @@ -122,22 +122,9 @@ config ATARI
    this kernel on an Atari, say Y here and browse the material
    available in ocumentation/m68k>; otherwise say N.

    -config HADES
    - bool "Hades support"
    - depends on ATARI && BROKEN
    - help
    - This option enables support for the Hades Atari clone. If you plan
    - to use this kernel on a Hades, say Y here; otherwise say N.
    -
    config PCI
    bool
    - depends on HADES
    - default y
    help
    - Find out whether you have a PCI motherboard. PCI is the name of a
    - bus system, i.e. the way the CPU talks to the other stuff inside
    - your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
    - VESA. If you have PCI, say Y, otherwise N.

    config MAC
    bool "Macintosh support"
    --- a/arch/m68k/atari/Makefile
    +++ b/arch/m68k/atari/Makefile
    @@ -5,7 +5,4 @@
    obj-y := config.o time.o debug.o ataints.o stdma.o \
    atasound.o stram.o

    -ifeq ($(CONFIG_PCI),y)
    -obj-$(CONFIG_HADES) += hades-pci.o
    -endif
    obj-$(CONFIG_ATARI_KBD_CORE) += atakeyb.o
    --- a/arch/m68k/atari/ataints.c
    +++ b/arch/m68k/atari/ataints.c
    @@ -407,10 +407,8 @@ void __init atari_init_IRQ(void)
    * gets overruns)
    */

    - if (!MACH_IS_HADES) {
    - vectors[VEC_INT2] = falcon_hblhandler;
    - vectors[VEC_INT4] = falcon_hblhandler;
    - }
    + vectors[VEC_INT2] = falcon_hblhandler;
    + vectors[VEC_INT4] = falcon_hblhandler;
    }

    if (ATARIHW_PRESENT(PCM_8BIT) && ATARIHW_PRESENT(MICROWIRE)) {
    --- a/arch/m68k/atari/config.c
    +++ b/arch/m68k/atari/config.c
    @@ -231,7 +231,7 @@ void __init config_atari(void)
    */

    printk("Atari hardware found: ");
    - if (MACH_IS_MEDUSA || MACH_IS_HADES) {
    + if (MACH_IS_MEDUSA) {
    /* There's no Atari video hardware on the Medusa, but all the
    * addresses below generate a DTACK so no bus error occurs! */
    } else if (hwreg_present(f030_xreg)) {
    @@ -269,10 +269,6 @@ void __init config_atari(void)
    ATARIHW_SET(SCSI_DMA);
    printk("TT_SCSI_DMA ");
    }
    - if (!MACH_IS_HADES && hwreg_present(&st_dma.dma_hi)) {
    - ATARIHW_SET(STND_DMA);
    - printk("STND_DMA ");
    - }
    /*
    * The ST-DMA address registers aren't readable
    * on all Medusas, so the test below may fail
    @@ -294,12 +290,11 @@ void __init config_atari(void)
    ATARIHW_SET(YM_2149);
    printk("YM2149 ");
    }
    - if (!MACH_IS_MEDUSA && !MACH_IS_HADES &&
    - hwreg_present(&tt_dmasnd.ctrl)) {
    + if (!MACH_IS_MEDUSA && hwreg_present(&tt_dmasnd.ctrl)) {
    ATARIHW_SET(PCM_8BIT);
    printk("PCM ");
    }
    - if (!MACH_IS_HADES && hwreg_present(&falcon_codec.unused5)) {
    + if (hwreg_present(&falcon_codec.unused5)) {
    ATARIHW_SET(CODEC);
    printk("CODEC ");
    }
    @@ -313,7 +308,7 @@ void __init config_atari(void)
    (tt_scc_dma.dma_ctrl = 0x01, (tt_scc_dma.dma_ctrl & 1) == 1) &&
    (tt_scc_dma.dma_ctrl = 0x00, (tt_scc_dma.dma_ctrl & 1) == 0)
    #else
    - !MACH_IS_MEDUSA && !MACH_IS_HADES
    + !MACH_IS_MEDUSA
    #endif
    ) {
    ATARIHW_SET(SCC_DMA);
    @@ -327,10 +322,7 @@ void __init config_atari(void)
    ATARIHW_SET(ST_ESCC);
    printk("ST_ESCC ");
    }
    - if (MACH_IS_HADES) {
    - ATARIHW_SET(VME);
    - printk("VME ");
    - } else if (hwreg_present(&tt_scu.sys_mask)) {
    + if (hwreg_present(&tt_scu.sys_mask)) {
    ATARIHW_SET(SCU);
    /* Assume a VME bus if there's a SCU */
    ATARIHW_SET(VME);
    @@ -340,7 +332,7 @@ void __init config_atari(void)
    ATARIHW_SET(ANALOG_JOY);
    printk("ANALOG_JOY ");
    }
    - if (!MACH_IS_HADES && hwreg_present(blitter.halftone)) {
    + if (hwreg_present(blitter.halftone)) {
    ATARIHW_SET(BLITTER);
    printk("BLITTER ");
    }
    @@ -349,8 +341,7 @@ void __init config_atari(void)
    printk("IDE ");
    }
    #if 1 /* This maybe wrong */
    - if (!MACH_IS_MEDUSA && !MACH_IS_HADES &&
    - hwreg_present(&tt_microwire.data) &&
    + if (!MACH_IS_MEDUSA && hwreg_present(&tt_microwire.data) &&
    hwreg_present(&tt_microwire.mask) &&
    (tt_microwire.mask = 0x7ff,
    udelay(1),
    @@ -369,19 +360,18 @@ void __init config_atari(void)
    mach_hwclk = atari_tt_hwclk;
    mach_set_clock_mmss = atari_tt_set_clock_mmss;
    }
    - if (!MACH_IS_HADES && hwreg_present(&mste_rtc.sec_ones)) {
    + if (hwreg_present(&mste_rtc.sec_ones)) {
    ATARIHW_SET(MSTE_CLK);
    printk("MSTE_CLK ");
    mach_hwclk = atari_mste_hwclk;
    mach_set_clock_mmss = atari_mste_set_clock_mmss;
    }
    - if (!MACH_IS_MEDUSA && !MACH_IS_HADES &&
    - hwreg_present(&dma_wd.fdc_speed) &&
    + if (!MACH_IS_MEDUSA && hwreg_present(&dma_wd.fdc_speed) &&
    hwreg_write(&dma_wd.fdc_speed, 0)) {
    ATARIHW_SET(FDCSPEED);
    printk("FDC_SPEED ");
    }
    - if (!MACH_IS_HADES && !ATARIHW_PRESENT(ST_SCSI)) {
    + if (!ATARIHW_PRESENT(ST_SCSI)) {
    ATARIHW_SET(ACSI);
    printk("ACSI ");
    }
    @@ -449,7 +439,7 @@ void __init config_atari(void)
    * 0xFFxxxxxx -> 0x00xxxxxx, so that the first 16MB is accessible
    * in the last 16MB of the address space.
    */
    - tos_version = (MACH_IS_MEDUSA || MACH_IS_HADES) ?
    + tos_version = (MACH_IS_MEDUSA) ?
    0xfff : *(unsigned short *)0xff000002;
    atari_rtc_year_offset = (tos_version < 0x306) ? 70 : 68;
    }
    @@ -511,8 +501,7 @@ static void atari_reset(void)
    * On the Medusa, phys. 0x4 may contain garbage because it's no
    * ROM. See above for explanation why we cannot use PTOV(4).
    */
    - reset_addr = MACH_IS_HADES ? 0x7fe00030 :
    - MACH_IS_MEDUSA || MACH_IS_AB40 ? 0xe00030 :
    + reset_addr = MACH_IS_MEDUSA || MACH_IS_AB40 ? 0xe00030 :
    *(unsigned long *) 0xff000004;

    /* reset ACIA for switch off OverScan, if it's active */
    @@ -606,8 +595,6 @@ static void atari_get_model(char *model)
    if (MACH_IS_MEDUSA)
    /* Medusa has TT _MCH cookie */
    strcat(model, "Medusa");
    - else if (MACH_IS_HADES)
    - strcat(model, "Hades");
    else
    strcat(model, "TT");
    break;
    --- a/arch/m68k/atari/hades-pci.c
    +++ /dev/null
    @@ -1,440 +0,0 @@
    -/*
    - * hades-pci.c - Hardware specific PCI BIOS functions the Hades Atari clone.
    - *
    - * Written by Wout Klaren.
    - */
    -
    -#include
    -#include
    -#include
    -
    -#if 0
    -# define DBG_DEVS(args) printk args
    -#else
    -# define DBG_DEVS(args)
    -#endif
    -
    -#if defined(CONFIG_PCI) && defined(CONFIG_HADES)
    -
    -#include
    -#include
    -#include
    -
    -#include
    -#include
    -#include
    -#include
    -
    -#define HADES_MEM_BASE 0x80000000
    -#define HADES_MEM_SIZE 0x20000000
    -#define HADES_CONFIG_BASE 0xA0000000
    -#define HADES_CONFIG_SIZE 0x10000000
    -#define HADES_IO_BASE 0xB0000000
    -#define HADES_IO_SIZE 0x10000000
    -#define HADES_VIRT_IO_SIZE 0x00010000 /* Only 64k is remapped and actually used. */
    -
    -#define N_SLOTS 4 /* Number of PCI slots. */
    -
    -static const char pci_mem_name[] = "PCI memory space";
    -static const char pci_io_name[] = "PCI I/O space";
    -static const char pci_config_name[] = "PCI config space";
    -
    -static struct resource config_space = {
    - .name = pci_config_name,
    - .start = HADES_CONFIG_BASE,
    - .end = HADES_CONFIG_BASE + HADES_CONFIG_SIZE - 1
    -};
    -static struct resource io_space = {
    - .name = pci_io_name,
    - .start = HADES_IO_BASE,
    - .end = HADES_IO_BASE + HADES_IO_SIZE - 1
    -};
    -
    -static const unsigned long pci_conf_base_phys[] = {
    - 0xA0080000, 0xA0040000, 0xA0020000, 0xA0010000
    -};
    -static unsigned long pci_conf_base_virt[N_SLOTS];
    -static unsigned long pci_io_base_virt;
    -
    -/*
    - * static void *mk_conf_addr(unsigned char bus, unsigned char device_fn,
    - * unsigned char where)
    - *
    - * Calculate the address of the PCI configuration area of the given
    - * device.
    - *
    - * BUG: boards with multiple functions are probably not correctly
    - * supported.
    - */
    -
    -static void *mk_conf_addr(struct pci_dev *dev, int where)
    -{
    - int device = dev->devfn >> 3, function = dev->devfn & 7;
    - void *result;
    -
    - DBG_DEVS(("mk_conf_addr(bus=%d ,device_fn=0x%x, where=0x%x, pci_addr=0x%p)\n",
    - dev->bus->number, dev->devfn, where, pci_addr));
    -
    - if (device > 3)
    - {
    - DBG_DEVS(("mk_conf_addr: device (%d) > 3, returning NULL\n", device));
    - return NULL;
    - }
    -
    - if (dev->bus->number != 0)
    - {
    - DBG_DEVS(("mk_conf_addr: bus (%d) > 0, returning NULL\n", device));
    - return NULL;
    - }
    -
    - result = (void *) (pci_conf_base_virt[device] | (function << 8) | (where));
    - DBG_DEVS(("mk_conf_addr: returning pci_addr 0x%lx\n", (unsigned long) result));
    - return result;
    -}
    -
    -static int hades_read_config_byte(struct pci_dev *dev, int where, u8 *value)
    -{
    - volatile unsigned char *pci_addr;
    -
    - *value = 0xff;
    -
    - if ((pci_addr = (unsigned char *) mk_conf_addr(dev, where)) == NULL)
    - return PCIBIOS_DEVICE_NOT_FOUND;
    -
    - *value = *pci_addr;
    -
    - return PCIBIOS_SUCCESSFUL;
    -}
    -
    -static int hades_read_config_word(struct pci_dev *dev, int where, u16 *value)
    -{
    - volatile unsigned short *pci_addr;
    -
    - *value = 0xffff;
    -
    - if (where & 0x1)
    - return PCIBIOS_BAD_REGISTER_NUMBER;
    -
    - if ((pci_addr = (unsigned short *) mk_conf_addr(dev, where)) == NULL)
    - return PCIBIOS_DEVICE_NOT_FOUND;
    -
    - *value = le16_to_cpu(*pci_addr);
    -
    - return PCIBIOS_SUCCESSFUL;
    -}
    -
    -static int hades_read_config_dword(struct pci_dev *dev, int where, u32 *value)
    -{
    - volatile unsigned int *pci_addr;
    - unsigned char header_type;
    - int result;
    -
    - *value = 0xffffffff;
    -
    - if (where & 0x3)
    - return PCIBIOS_BAD_REGISTER_NUMBER;
    -
    - if ((pci_addr = (unsigned int *) mk_conf_addr(dev, where)) == NULL)
    - return PCIBIOS_DEVICE_NOT_FOUND;
    -
    - *value = le32_to_cpu(*pci_addr);
    -
    - /*
    - * Check if the value is an address on the bus. If true, add the
    - * base address of the PCI memory or PCI I/O area on the Hades.
    - */
    -
    - if ((result = hades_read_config_byte(dev, PCI_HEADER_TYPE,
    - &header_type)) != PCIBIOS_SUCCESSFUL)
    - return result;
    -
    - if (((where >= PCI_BASE_ADDRESS_0) && (where <= PCI_BASE_ADDRESS_1)) ||
    - ((header_type != PCI_HEADER_TYPE_BRIDGE) && ((where >= PCI_BASE_ADDRESS_2) &&
    - (where <= PCI_BASE_ADDRESS_5))))
    - {
    - if ((*value & PCI_BASE_ADDRESS_SPACE) == PCI_BASE_ADDRESS_SPACE_IO)
    - {
    - /*
    - * Base address register that contains an I/O address. If the
    - * address is valid on the Hades (0 <= *value < HADES_VIRT_IO_SIZE),
    - * add 'pci_io_base_virt' to the value.
    - */
    -
    - if (*value < HADES_VIRT_IO_SIZE)
    - *value += pci_io_base_virt;
    - }
    - else
    - {
    - /*
    - * Base address register that contains an memory address. If the
    - * address is valid on the Hades (0 <= *value < HADES_MEM_SIZE),
    - * add HADES_MEM_BASE to the value.
    - */
    -
    - if (*value == 0)
    - {
    - /*
    - * Base address is 0. Test if this base
    - * address register is used.
    - */
    -
    - *pci_addr = 0xffffffff;
    - if (*pci_addr != 0)
    - {
    - *pci_addr = *value;
    - if (*value < HADES_MEM_SIZE)
    - *value += HADES_MEM_BASE;
    - }
    - }
    - else
    - {
    - if (*value < HADES_MEM_SIZE)
    - *value += HADES_MEM_BASE;
    - }
    - }
    - }
    -
    - return PCIBIOS_SUCCESSFUL;
    -}
    -
    -static int hades_write_config_byte(struct pci_dev *dev, int where, u8 value)
    -{
    - volatile unsigned char *pci_addr;
    -
    - if ((pci_addr = (unsigned char *) mk_conf_addr(dev, where)) == NULL)
    - return PCIBIOS_DEVICE_NOT_FOUND;
    -
    - *pci_addr = value;
    -
    - return PCIBIOS_SUCCESSFUL;
    -}
    -
    -static int hades_write_config_word(struct pci_dev *dev, int where, u16 value)
    -{
    - volatile unsigned short *pci_addr;
    -
    - if ((pci_addr = (unsigned short *) mk_conf_addr(dev, where)) == NULL)
    - return PCIBIOS_DEVICE_NOT_FOUND;
    -
    - *pci_addr = cpu_to_le16(value);
    -
    - return PCIBIOS_SUCCESSFUL;
    -}
    -
    -static int hades_write_config_dword(struct pci_dev *dev, int where, u32 value)
    -{
    - volatile unsigned int *pci_addr;
    - unsigned char header_type;
    - int result;
    -
    - if ((pci_addr = (unsigned int *) mk_conf_addr(dev, where)) == NULL)
    - return PCIBIOS_DEVICE_NOT_FOUND;
    -
    - /*
    - * Check if the value is an address on the bus. If true, subtract the
    - * base address of the PCI memory or PCI I/O area on the Hades.
    - */
    -
    - if ((result = hades_read_config_byte(dev, PCI_HEADER_TYPE,
    - &header_type)) != PCIBIOS_SUCCESSFUL)
    - return result;
    -
    - if (((where >= PCI_BASE_ADDRESS_0) && (where <= PCI_BASE_ADDRESS_1)) ||
    - ((header_type != PCI_HEADER_TYPE_BRIDGE) && ((where >= PCI_BASE_ADDRESS_2) &&
    - (where <= PCI_BASE_ADDRESS_5))))
    - {
    - if ((value & PCI_BASE_ADDRESS_SPACE) ==
    - PCI_BASE_ADDRESS_SPACE_IO)
    - {
    - /*
    - * I/O address. Check if the address is valid address on
    - * the Hades (pci_io_base_virt <= value < pci_io_base_virt +
    - * HADES_VIRT_IO_SIZE) or if the value is 0xffffffff. If not
    - * true do not write the base address register. If it is a
    - * valid base address subtract 'pci_io_base_virt' from the value.
    - */
    -
    - if ((value >= pci_io_base_virt) && (value < (pci_io_base_virt +
    - HADES_VIRT_IO_SIZE)))
    - value -= pci_io_base_virt;
    - else
    - {
    - if (value != 0xffffffff)
    - return PCIBIOS_SET_FAILED;
    - }
    - }
    - else
    - {
    - /*
    - * Memory address. Check if the address is valid address on
    - * the Hades (HADES_MEM_BASE <= value < HADES_MEM_BASE + HADES_MEM_SIZE) or
    - * if the value is 0xffffffff. If not true do not write
    - * the base address register. If it is a valid base address
    - * subtract HADES_MEM_BASE from the value.
    - */
    -
    - if ((value >= HADES_MEM_BASE) && (value < (HADES_MEM_BASE + HADES_MEM_SIZE)))
    - value -= HADES_MEM_BASE;
    - else
    - {
    - if (value != 0xffffffff)
    - return PCIBIOS_SET_FAILED;
    - }
    - }
    - }
    -
    - *pci_addr = cpu_to_le32(value);
    -
    - return PCIBIOS_SUCCESSFUL;
    -}
    -
    -/*
    - * static inline void hades_fixup(void)
    - *
    - * Assign IRQ numbers as used by Linux to the interrupt pins
    - * of the PCI cards.
    - */
    -
    -static void __init hades_fixup(int pci_modify)
    -{
    - char irq_tab[4] = {
    - [0] = IRQ_TT_MFP_IO0, /* Slot 0. */
    - [1] = IRQ_TT_MFP_IO1, /* Slot 1. */
    - [2] = IRQ_TT_MFP_SCC, /* Slot 2. */
    - [3] = IRQ_TT_MFP_SCSIDMA /* Slot 3. */
    - };
    - struct pci_dev *dev = NULL;
    - unsigned char slot;
    -
    - /*
    - * Go through all devices, fixing up irqs as we see fit:
    - */
    -
    - while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
    - {
    - if (dev->class >> 16 != PCI_BASE_CLASS_BRIDGE)
    - {
    - slot = PCI_SLOT(dev->devfn); /* Determine slot number. */
    - dev->irq = irq_tab[slot];
    - if (pci_modify)
    - pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
    - }
    - }
    -}
    -
    -/*
    - * static void hades_conf_device(struct pci_dev *dev)
    - *
    - * Machine dependent Configure the given device.
    - *
    - * Parameters:
    - *
    - * dev - the pci device.
    - */
    -
    -static void __init hades_conf_device(struct pci_dev *dev)
    -{
    - pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, 0);
    -}
    -
    -static struct pci_ops hades_pci_ops = {
    - .read_byte = hades_read_config_byte,
    - .read_word = hades_read_config_word,
    - .read_dword = hades_read_config_dword,
    - .write_byte = hades_write_config_byte,
    - .write_word = hades_write_config_word,
    - .write_dword = hades_write_config_dword
    -};
    -
    -/*
    - * struct pci_bus_info *init_hades_pci(void)
    - *
    - * Machine specific initialisation:
    - *
    - * - Allocate and initialise a 'pci_bus_info' structure
    - * - Initialise hardware
    - *
    - * Result: pointer to 'pci_bus_info' structure.
    - */
    -
    -struct pci_bus_info * __init init_hades_pci(void)
    -{
    - struct pci_bus_info *bus;
    - int i;
    -
    - /*
    - * Remap I/O and configuration space.
    - */
    -
    - pci_io_base_virt = (unsigned long) ioremap(HADES_IO_BASE, HADES_VIRT_IO_SIZE);
    -
    - for (i = 0; i < N_SLOTS; i++)
    - pci_conf_base_virt[i] = (unsigned long) ioremap(pci_conf_base_phys[i], 0x10000);
    -
    - /*
    - * Allocate memory for bus info structure.
    - */
    -
    - bus = kzalloc(sizeof(struct pci_bus_info), GFP_KERNEL);
    - if (unlikely(!bus))
    - goto iounmap_base_virt;
    -
    - /*
    - * Claim resources. The m68k has no separate I/O space, both
    - * PCI memory space and PCI I/O space are in memory space. Therefore
    - * the I/O resources are requested in memory space as well.
    - */
    -
    - if (unlikely(request_resource(&iomem_resource, &config_space) != 0))
    - goto free_bus;
    -
    - if (unlikely(request_resource(&iomem_resource, &io_space) != 0))
    - goto release_config_space;
    -
    - bus->mem_space.start = HADES_MEM_BASE;
    - bus->mem_space.end = HADES_MEM_BASE + HADES_MEM_SIZE - 1;
    - bus->mem_space.name = pci_mem_name;
    -#if 1
    - if (unlikely(request_resource(&iomem_resource, &bus->mem_space) != 0))
    - goto release_io_space;
    -#endif
    - bus->io_space.start = pci_io_base_virt;
    - bus->io_space.end = pci_io_base_virt + HADES_VIRT_IO_SIZE - 1;
    - bus->io_space.name = pci_io_name;
    -#if 1
    - if (unlikely(request_resource(&ioport_resource, &bus->io_space) != 0))
    - goto release_bus_mem_space;
    -#endif
    - /*
    - * Set hardware dependent functions.
    - */
    -
    - bus->m68k_pci_ops = &hades_pci_ops;
    - bus->fixup = hades_fixup;
    - bus->conf_device = hades_conf_device;
    -
    - /*
    - * Select high to low edge for PCI interrupts.
    - */
    -
    - tt_mfp.active_edge &= ~0x27;
    -
    - return bus;
    -
    -release_bus_mem_space:
    - release_resource(&bus->mem_space);
    -release_io_space:
    - release_resource(&io_space);
    -release_config_space:
    - release_resource(&config_space);
    -free_bus:
    - kfree(bus);
    -iounmap_base_virt:
    - iounmap((void *)pci_io_base_virt);
    -
    - for (i = 0; i < N_SLOTS; i++)
    - iounmap((void *)pci_conf_base_virt[i]);
    -
    - return NULL;
    -}
    -#endif
    --- a/arch/m68k/kernel/bios32.c
    +++ b/arch/m68k/kernel/bios32.c
    @@ -476,10 +476,12 @@ void __init pcibios_init(void)
    printk("Linux/m68k PCI BIOS32 revision %x.%02x\n", MAJOR_REV, MINOR_REV);

    bus_info = NULL;
    -#ifdef CONFIG_HADES
    +
    +/* Hades code was:
    if (MACH_IS_HADES)
    bus_info = init_hades_pci();
    -#endif
    +*/
    +
    if (bus_info != NULL)
    {
    printk("PCI: Probing PCI hardware\n");
    --- a/arch/m68k/kernel/process.c
    +++ b/arch/m68k/kernel/process.c
    @@ -78,7 +78,7 @@ unsigned long thread_saved_pc(struct tas
    static void default_idle(void)
    {
    if (!need_resched())
    -#if defined(MACH_ATARI_ONLY) && !defined(CONFIG_HADES)
    +#if defined(MACH_ATARI_ONLY)
    /* block out HSYNC on the atari (falcon) */
    __asm__("stop #0x2200" : : : "cc");
    #else
    --- a/drivers/block/ataflop.c
    +++ b/drivers/block/ataflop.c
    @@ -1882,10 +1882,6 @@ static int __init atari_floppy_init (voi
    /* Amiga, Mac, ... don't have Atari-compatible floppy :-) */
    return -ENODEV;

    - if (MACH_IS_HADES)
    - /* Hades doesn't have Atari-compatible floppy */
    - return -ENODEV;
    -
    if (register_blkdev(FLOPPY_MAJOR,"fd"))
    return -EBUSY;

    --- a/drivers/scsi/Kconfig
    +++ b/drivers/scsi/Kconfig
    @@ -1670,14 +1670,6 @@ config ATARI_SCSI_RESET_BOOT
    boot process fractionally longer but may assist recovery from errors
    that leave the devices with SCSI operations partway completed.

    -config TT_DMA_EMUL
    - bool "Hades SCSI DMA emulator"
    - depends on ATARI_SCSI && HADES
    - help
    - This option enables code which emulates the TT SCSI DMA chip on the
    - Hades. This increases the SCSI transfer rates at least ten times
    - compared to PIO transfers.
    -
    config MAC_SCSI
    bool "Macintosh NCR5380 SCSI"
    depends on MAC && SCSI=y
    --- a/drivers/scsi/atari_dma_emul.c
    +++ /dev/null
    @@ -1,468 +0,0 @@
    -/*
    - * atari_dma_emul.c -- TT SCSI DMA emulator for the Hades.
    - *
    - * Copyright 1997 Wout Klaren
    - *
    - * This file is subject to the terms and conditions of the GNU General Public
    - * License. See the file COPYING in the main directory of this archive
    - * for more details.
    - *
    - * This code was written using the Hades TOS source code as a
    - * reference. This source code can be found on the home page
    - * of Medusa Computer Systems.
    - *
    - * Version 0.1, 1997-09-24.
    - *
    - * This code should be considered experimental. It has only been
    - * tested on a Hades with a 68060. It might not work on a Hades
    - * with a 68040. Make backups of your hard drives before using
    - * this code.
    - */
    -
    -#include
    -#include
    -#include
    -
    -#define hades_dma_ctrl (*(unsigned char *) 0xffff8717)
    -#define hades_psdm_reg (*(unsigned char *) 0xffff8741)
    -
    -#define TRANSFER_SIZE 16
    -
    -struct m68040_frame {
    - unsigned long effaddr; /* effective address */
    - unsigned short ssw; /* special status word */
    - unsigned short wb3s; /* write back 3 status */
    - unsigned short wb2s; /* write back 2 status */
    - unsigned short wb1s; /* write back 1 status */
    - unsigned long faddr; /* fault address */
    - unsigned long wb3a; /* write back 3 address */
    - unsigned long wb3d; /* write back 3 data */
    - unsigned long wb2a; /* write back 2 address */
    - unsigned long wb2d; /* write back 2 data */
    - unsigned long wb1a; /* write back 1 address */
    - unsigned long wb1dpd0; /* write back 1 data/push data 0*/
    - unsigned long pd1; /* push data 1*/
    - unsigned long pd2; /* push data 2*/
    - unsigned long pd3; /* push data 3*/
    -};
    -
    -static void writeback (unsigned short wbs, unsigned long wba,
    - unsigned long wbd, void *old_buserr)
    -{
    - mm_segment_t fs = get_fs();
    - static void *save_buserr;
    -
    - __asm__ __volatile__ ("movec.l %%vbr,%%a0\n\t"
    - "move.l %0,8(%%a0)\n\t"
    - :
    - : "r" (&&bus_error)
    - : "a0" );
    -
    - save_buserr = old_buserr;
    -
    - set_fs (MAKE_MM_SEG(wbs & WBTM_040));
    -
    - switch (wbs & WBSIZ_040) {
    - case BA_SIZE_BYTE:
    - put_user (wbd & 0xff, (char *)wba);
    - break;
    - case BA_SIZE_WORD:
    - put_user (wbd & 0xffff, (short *)wba);
    - break;
    - case BA_SIZE_LONG:
    - put_user (wbd, (int *)wba);
    - break;
    - }
    -
    - set_fs (fs);
    - return;
    -
    -bus_error:
    - __asm__ __volatile__ ("cmp.l %0,2(%%sp)\n\t"
    - "bcs.s .jump_old\n\t"
    - "cmp.l %1,2(%%sp)\n\t"
    - "bls.s .restore_old\n"
    - ".jump_old:\n\t"
    - "move.l %2,-(%%sp)\n\t"
    - "rts\n"
    - ".restore_old:\n\t"
    - "move.l %%a0,-(%%sp)\n\t"
    - "movec.l %%vbr,%%a0\n\t"
    - "move.l %2,8(%%a0)\n\t"
    - "move.l (%%sp)+,%%a0\n\t"
    - "rte\n\t"
    - :
    - : "i" (writeback), "i" (&&bus_error),
    - "m" (save_buserr) );
    -}
    -
    -/*
    - * static inline void set_restdata_reg(unsigned char *cur_addr)
    - *
    - * Set the rest data register if necessary.
    - */
    -
    -static inline void set_restdata_reg(unsigned char *cur_addr)
    -{
    - if (((long) cur_addr & ~3) != 0)
    - tt_scsi_dma.dma_restdata =
    - *((unsigned long *) ((long) cur_addr & ~3));
    -}
    -
    -/*
    - * void hades_dma_emulator(int irq, void *dummy)
    - *
    - * This code emulates TT SCSI DMA on the Hades.
    - *
    - * Note the following:
    - *
    - * 1. When there is no byte available to read from the SCSI bus, or
    - * when a byte cannot yet bet written to the SCSI bus, a bus
    - * error occurs when reading or writing the pseudo DMA data
    - * register (hades_psdm_reg). We have to catch this bus error
    - * and try again to read or write the byte. If after several tries
    - * we still get a bus error, the interrupt handler is left. When
    - * the byte can be read or written, the interrupt handler is
    - * called again.
    - *
    - * 2. The SCSI interrupt must be disabled in this interrupt handler.
    - *
    - * 3. If we set the EOP signal, the SCSI controller still expects one
    - * byte to be read or written. Therefore the last byte is transferred
    - * separately, after setting the EOP signal.
    - *
    - * 4. When this function is left, the address pointer (start_addr) is
    - * converted to a physical address. Because it points one byte
    - * further than the last transferred byte, it can point outside the
    - * current page. If virt_to_phys() is called with this address we
    - * might get an access error. Therefore virt_to_phys() is called with
    - * start_addr - 1 if the count has reached zero. The result is
    - * increased with one.
    - */
    -
    -static irqreturn_t hades_dma_emulator(int irq, void *dummy)
    -{
    - unsigned long dma_base;
    - register unsigned long dma_cnt asm ("d3");
    - static long save_buserr;
    - register unsigned long save_sp asm ("d4");
    - register int tries asm ("d5");
    - register unsigned char *start_addr asm ("a3"), *end_addr asm ("a4");
    - register unsigned char *eff_addr;
    - register unsigned char *psdm_reg;
    - unsigned long rem;
    -
    - atari_disable_irq(IRQ_TT_MFP_SCSI);
    -
    - /*
    - * Read the dma address and count registers.
    - */
    -
    - dma_base = SCSI_DMA_READ_P(dma_addr);
    - dma_cnt = SCSI_DMA_READ_P(dma_cnt);
    -
    - /*
    - * Check if DMA is still enabled.
    - */
    -
    - if ((tt_scsi_dma.dma_ctrl & 2) == 0)
    - {
    - atari_enable_irq(IRQ_TT_MFP_SCSI);
    - return IRQ_HANDLED;
    - }
    -
    - if (dma_cnt == 0)
    - {
    - printk(KERN_NOTICE "DMA emulation: count is zero.\n");
    - tt_scsi_dma.dma_ctrl &= 0xfd; /* DMA ready. */
    - atari_enable_irq(IRQ_TT_MFP_SCSI);
    - return IRQ_HANDLED;
    - }
    -
    - /*
    - * Install new bus error routine.
    - */
    -
    - __asm__ __volatile__ ("movec.l %%vbr,%%a0\n\t"
    - "move.l 8(%%a0),%0\n\t"
    - "move.l %1,8(%%a0)\n\t"
    - : "=&r" (save_buserr)
    - : "r" (&&scsi_bus_error)
    - : "a0" );
    -
    - hades_dma_ctrl &= 0xfc; /* Bus error and EOP off. */
    -
    - /*
    - * Save the stack pointer.
    - */
    -
    - __asm__ __volatile__ ("move.l %%sp,%0\n\t"
    - : "=&r" (save_sp) );
    -
    - tries = 100; /* Maximum number of bus errors. */
    - start_addr = phys_to_virt(dma_base);
    - end_addr = start_addr + dma_cnt;
    -
    -scsi_loop:
    - dma_cnt--;
    - rem = dma_cnt & (TRANSFER_SIZE - 1);
    - dma_cnt &= ~(TRANSFER_SIZE - 1);
    - psdm_reg = &hades_psdm_reg;
    -
    - if (tt_scsi_dma.dma_ctrl & 1) /* Read or write? */
    - {
    - /*
    - * SCSI write. Abort when count is zero.
    - */
    -
    - switch (rem)
    - {
    - case 0:
    - while (dma_cnt > 0)
    - {
    - dma_cnt -= TRANSFER_SIZE;
    -
    - *psdm_reg = *start_addr++;
    - case 15:
    - *psdm_reg = *start_addr++;
    - case 14:
    - *psdm_reg = *start_addr++;
    - case 13:
    - *psdm_reg = *start_addr++;
    - case 12:
    - *psdm_reg = *start_addr++;
    - case 11:
    - *psdm_reg = *start_addr++;
    - case 10:
    - *psdm_reg = *start_addr++;
    - case 9:
    - *psdm_reg = *start_addr++;
    - case 8:
    - *psdm_reg = *start_addr++;
    - case 7:
    - *psdm_reg = *start_addr++;
    - case 6:
    - *psdm_reg = *start_addr++;
    - case 5:
    - *psdm_reg = *start_addr++;
    - case 4:
    - *psdm_reg = *start_addr++;
    - case 3:
    - *psdm_reg = *start_addr++;
    - case 2:
    - *psdm_reg = *start_addr++;
    - case 1:
    - *psdm_reg = *start_addr++;
    - }
    - }
    -
    - hades_dma_ctrl |= 1; /* Set EOP. */
    - udelay(10);
    - *psdm_reg = *start_addr++; /* Dummy byte. */
    - tt_scsi_dma.dma_ctrl &= 0xfd; /* DMA ready. */
    - }
    - else
    - {
    - /*
    - * SCSI read. Abort when count is zero.
    - */
    -
    - switch (rem)
    - {
    - case 0:
    - while (dma_cnt > 0)
    - {
    - dma_cnt -= TRANSFER_SIZE;
    -
    - *start_addr++ = *psdm_reg;
    - case 15:
    - *start_addr++ = *psdm_reg;
    - case 14:
    - *start_addr++ = *psdm_reg;
    - case 13:
    - *start_addr++ = *psdm_reg;
    - case 12:
    - *start_addr++ = *psdm_reg;
    - case 11:
    - *start_addr++ = *psdm_reg;
    - case 10:
    - *start_addr++ = *psdm_reg;
    - case 9:
    - *start_addr++ = *psdm_reg;
    - case 8:
    - *start_addr++ = *psdm_reg;
    - case 7:
    - *start_addr++ = *psdm_reg;
    - case 6:
    - *start_addr++ = *psdm_reg;
    - case 5:
    - *start_addr++ = *psdm_reg;
    - case 4:
    - *start_addr++ = *psdm_reg;
    - case 3:
    - *start_addr++ = *psdm_reg;
    - case 2:
    - *start_addr++ = *psdm_reg;
    - case 1:
    - *start_addr++ = *psdm_reg;
    - }
    - }
    -
    - hades_dma_ctrl |= 1; /* Set EOP. */
    - udelay(10);
    - *start_addr++ = *psdm_reg;
    - tt_scsi_dma.dma_ctrl &= 0xfd; /* DMA ready. */
    -
    - set_restdata_reg(start_addr);
    - }
    -
    - if (start_addr != end_addr)
    - printk(KERN_CRIT "DMA emulation: FATAL: Count is not zero at end of transfer.\n");
    -
    - dma_cnt = end_addr - start_addr;
    -
    -scsi_end:
    - dma_base = (dma_cnt == 0) ? virt_to_phys(start_addr - 1) + 1 :
    - virt_to_phys(start_addr);
    -
    - SCSI_DMA_WRITE_P(dma_addr, dma_base);
    - SCSI_DMA_WRITE_P(dma_cnt, dma_cnt);
    -
    - /*
    - * Restore old bus error routine.
    - */
    -
    - __asm__ __volatile__ ("movec.l %%vbr,%%a0\n\t"
    - "move.l %0,8(%%a0)\n\t"
    - :
    - : "r" (save_buserr)
    - : "a0" );
    -
    - atari_enable_irq(IRQ_TT_MFP_SCSI);
    -
    - return IRQ_HANDLED;
    -
    -scsi_bus_error:
    - /*
    - * First check if the bus error is caused by our code.
    - * If not, call the original handler.
    - */
    -
    - __asm__ __volatile__ ("cmp.l %0,2(%%sp)\n\t"
    - "bcs.s .old_vector\n\t"
    - "cmp.l %1,2(%%sp)\n\t"
    - "bls.s .scsi_buserr\n"
    - ".old_vector:\n\t"
    - "move.l %2,-(%%sp)\n\t"
    - "rts\n"
    - ".scsi_buserr:\n\t"
    - :
    - : "i" (&&scsi_loop), "i" (&&scsi_end),
    - "m" (save_buserr) );
    -
    - if (CPU_IS_060)
    - {
    - /*
    - * Get effective address and restore the stack.
    - */
    -
    - __asm__ __volatile__ ("move.l 8(%%sp),%0\n\t"
    - "move.l %1,%%sp\n\t"
    - : "=a&" (eff_addr)
    - : "r" (save_sp) );
    - }
    - else
    - {
    - register struct m68040_frame *frame;
    -
    - __asm__ __volatile__ ("lea 8(%%sp),%0\n\t"
    - : "=a&" (frame) );
    -
    - if (tt_scsi_dma.dma_ctrl & 1)
    - {
    - /*
    - * Bus error while writing.
    - */
    -
    - if (frame->wb3s & WBV_040)
    - {
    - if (frame->wb3a == (long) &hades_psdm_reg)
    - start_addr--;
    - else
    - writeback(frame->wb3s, frame->wb3a,
    - frame->wb3d, &&scsi_bus_error);
    - }
    -
    - if (frame->wb2s & WBV_040)
    - {
    - if (frame->wb2a == (long) &hades_psdm_reg)
    - start_addr--;
    - else
    - writeback(frame->wb2s, frame->wb2a,
    - frame->wb2d, &&scsi_bus_error);
    - }
    -
    - if (frame->wb1s & WBV_040)
    - {
    - if (frame->wb1a == (long) &hades_psdm_reg)
    - start_addr--;
    - }
    - }
    - else
    - {
    - /*
    - * Bus error while reading.
    - */
    -
    - if (frame->wb3s & WBV_040)
    - writeback(frame->wb3s, frame->wb3a,
    - frame->wb3d, &&scsi_bus_error);
    - }
    -
    - eff_addr = (unsigned char *) frame->faddr;
    -
    - __asm__ __volatile__ ("move.l %0,%%sp\n\t"
    - :
    - : "r" (save_sp) );
    - }
    -
    - dma_cnt = end_addr - start_addr;
    -
    - if (eff_addr == &hades_psdm_reg)
    - {
    - /*
    - * Bus error occurred while reading the pseudo
    - * DMA register. Time out.
    - */
    -
    - tries--;
    -
    - if (tries <= 0)
    - {
    - if ((tt_scsi_dma.dma_ctrl & 1) == 0) /* Read or write? */
    - set_restdata_reg(start_addr);
    -
    - if (dma_cnt <= 1)
    - printk(KERN_CRIT "DMA emulation: Fatal "
    - "error while %s the last byte.\n",
    - (tt_scsi_dma.dma_ctrl & 1)
    - ? "writing" : "reading");
    -
    - goto scsi_end;
    - }
    - else
    - goto scsi_loop;
    - }
    - else
    - {
    - /*
    - * Bus error during pseudo DMA transfer.
    - * Terminate the DMA transfer.
    - */
    -
    - hades_dma_ctrl |= 3; /* Set EOP and bus error. */
    - if ((tt_scsi_dma.dma_ctrl & 1) == 0) /* Read or write? */
    - set_restdata_reg(start_addr);
    - goto scsi_end;
    - }
    -}
    --- a/drivers/scsi/atari_scsi.c
    +++ b/drivers/scsi/atari_scsi.c
    @@ -249,10 +249,6 @@ static int setup_hostid = -1;
    module_param(setup_hostid, int, 0);


    -#if defined(CONFIG_TT_DMA_EMUL)
    -#include "atari_dma_emul.c"
    -#endif
    -
    #if defined(REAL_DMA)

    static int scsi_dma_is_ignored_buserr(unsigned char dma_stat)
    @@ -695,21 +691,8 @@ int atari_scsi_detect(struct scsi_host_t
    #ifdef REAL_DMA
    tt_scsi_dma.dma_ctrl = 0;
    atari_dma_residual = 0;
    -#ifdef CONFIG_TT_DMA_EMUL
    - if (MACH_IS_HADES) {
    - if (request_irq(IRQ_AUTO_2, hades_dma_emulator,
    - IRQ_TYPE_PRIO, "Hades DMA emulator",
    - hades_dma_emulator)) {
    - printk(KERN_ERR "atari_scsi_detect: cannot allocate irq %d, aborting (MACH_IS_HADES)",IRQ_AUTO_2);
    - free_irq(IRQ_TT_MFP_SCSI, instance);
    - scsi_unregister(atari_scsi_host);
    - atari_stram_free(atari_dma_buffer);
    - atari_dma_buffer = 0;
    - return 0;
    - }
    - }
    -#endif
    - if (MACH_IS_MEDUSA || MACH_IS_HADES) {
    +
    + if (MACH_IS_MEDUSA) {
    /* While the read overruns (described by Drew Eckhardt in
    * NCR5380.c) never happened on TTs, they do in fact on the Medusa
    * (This was the cause why SCSI didn't work right for so long
    @@ -1007,11 +990,7 @@ static unsigned long atari_dma_xfer_len(
    Scsi_Cmnd *cmd, int write_flag)
    {
    unsigned long possible_len, limit;
    -#ifndef CONFIG_TT_DMA_EMUL
    - if (MACH_IS_HADES)
    - /* Hades has no SCSI DMA at all :-( Always force use of PIO */
    - return 0;
    -#endif
    +
    if (IS_A_TT())
    /* TT SCSI DMA can transfer arbitrary #bytes */
    return wanted_len;
    --- a/include/asm-m68k/atarihw.h
    +++ b/include/asm-m68k/atarihw.h
    @@ -39,7 +39,6 @@ extern int atari_dont_touch_floppy_selec
    #define MACH_IS_TT ((atari_mch_cookie >> 16) == ATARI_MCH_TT)
    #define MACH_IS_FALCON ((atari_mch_cookie >> 16) == ATARI_MCH_FALCON)
    #define MACH_IS_MEDUSA (atari_mch_type == ATARI_MACH_MEDUSA)
    -#define MACH_IS_HADES (atari_mch_type == ATARI_MACH_HADES)
    #define MACH_IS_AB40 (atari_mch_type == ATARI_MACH_AB40)

    /* values for atari_switches */
    --- a/include/asm-m68k/entry.h
    +++ b/include/asm-m68k/entry.h
    @@ -31,7 +31,7 @@
    */

    /* the following macro is used when enabling interrupts */
    -#if defined(MACH_ATARI_ONLY) && !defined(CONFIG_HADES)
    +#if defined(MACH_ATARI_ONLY)
    /* block out HSYNC on the atari */
    #define ALLOWINT (~0x400)
    #define MAX_NOINT_IPL 3
    --- a/include/asm-m68k/virtconvert.h
    +++ b/include/asm-m68k/virtconvert.h
    @@ -40,15 +40,9 @@ static inline void *phys_to_virt(unsigne

    /*
    * IO bus memory addresses are 1:1 with the physical address,
    - * except on the PCI bus of the Hades.
    */
    -#ifdef CONFIG_HADES
    -#define virt_to_bus(a) (virt_to_phys(a) + (MACH_IS_HADES ? 0x80000000 : 0))
    -#define bus_to_virt(a) (phys_to_virt((a) - (MACH_IS_HADES ? 0x80000000 : 0)))
    -#else
    #define virt_to_bus virt_to_phys
    #define bus_to_virt phys_to_virt
    -#endif

    #endif
    #endif

    --
    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 from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  7. [patch 18/18] arch/m68k/mm/kmap.c: introduce missing kfree

    From: Julia Lawall

    Error handling code following a kmalloc should free the allocated data.

    The semantic match that finds the problem is as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @r exists@
    local idexpression x;
    statement S;
    expression E;
    identifier f,l;
    position p1,p2;
    expression *ptr != NULL;
    @@

    (
    if ((x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...)) == NULL) S
    |
    x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
    ...
    if (x == NULL) S
    )
    <... when != x
    when != if (...) { <+...x...+> }
    x->f = E
    ...>
    (
    return \(0\|<+...x...+>\|ptr\);
    |
    return@p2 ...;
    )

    @scriptython@
    p1 << r.p1;
    p2 << r.p2;
    @@

    print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
    //


    Signed-off-by: Julia Lawall
    Signed-off-by: Geert Uytterhoeven
    ---
    arch/m68k/mm/kmap.c | 4 +++-
    1 file changed, 3 insertions(+), 1 deletion(-)

    --- a/arch/m68k/mm/kmap.c
    +++ b/arch/m68k/mm/kmap.c
    @@ -66,8 +66,10 @@ static struct vm_struct *get_io_area(uns
    for (p = &iolist; (tmp = *p) ; p = &tmp->next) {
    if (size + addr < (unsigned long)tmp->addr)
    break;
    - if (addr > KMAP_END-size)
    + if (addr > KMAP_END-size) {
    + kfree(area);
    return NULL;
    + }
    addr = tmp->size + (unsigned long)tmp->addr;
    }
    area->addr = (void *)addr;

    --
    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 from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  8. [patch 14/18] m68k: remove the dead PCI code

    From: Adrian Bunk

    This patch removes the no longer used m68k PCI code.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Geert Uytterhoeven
    ---
    arch/m68k/Kconfig | 4
    arch/m68k/kernel/Makefile | 1
    arch/m68k/kernel/bios32.c | 516 ----------------------------------------------
    include/asm-m68k/dma.h | 4
    include/asm-m68k/io.h | 66 -----
    include/asm-m68k/pci.h | 46 ----
    6 files changed, 7 insertions(+), 630 deletions(-)


    --- a/arch/m68k/Kconfig
    +++ b/arch/m68k/Kconfig
    @@ -122,10 +122,6 @@ config ATARI
    this kernel on an Atari, say Y here and browse the material
    available in ocumentation/m68k>; otherwise say N.

    -config PCI
    - bool
    - help
    -
    config MAC
    bool "Macintosh support"
    select MMU_MOTOROLA if MMU
    --- a/arch/m68k/kernel/Makefile
    +++ b/arch/m68k/kernel/Makefile
    @@ -14,5 +14,4 @@ obj-y := entry.o process.o traps.o ints.

    devres-y = ../../../kernel/irq/devres.o

    -obj-$(CONFIG_PCI) += bios32.o
    obj-y$(CONFIG_MMU_SUN3) += dma.o # no, it's not a typo
    --- a/arch/m68k/kernel/bios32.c
    +++ /dev/null
    @@ -1,516 +0,0 @@
    -/*
    - * bios32.c - PCI BIOS functions for m68k systems.
    - *
    - * Written by Wout Klaren.
    - *
    - * Based on the DEC Alpha bios32.c by Dave Rusling and David Mosberger.
    - */
    -
    -#include
    -#include
    -
    -#if 0
    -# define DBG_DEVS(args) printk args
    -#else
    -# define DBG_DEVS(args)
    -#endif
    -
    -#ifdef CONFIG_PCI
    -
    -/*
    - * PCI support for Linux/m68k. Currently only the Hades is supported.
    - *
    - * The support for PCI bridges in the DEC Alpha version has
    - * been removed in this version.
    - */
    -
    -#include
    -#include
    -#include
    -
    -#include
    -#include
    -#include
    -
    -#define KB 1024
    -#define MB (1024*KB)
    -#define GB (1024*MB)
    -
    -#define MAJOR_REV 0
    -#define MINOR_REV 5
    -
    -/*
    - * Align VAL to ALIGN, which must be a power of two.
    - */
    -
    -#define ALIGN(val,align) (((val) + ((align) - 1)) & ~((align) - 1))
    -
    -/*
    - * Offsets relative to the I/O and memory base addresses from where resources
    - * are allocated.
    - */
    -
    -#define IO_ALLOC_OFFSET 0x00004000
    -#define MEM_ALLOC_OFFSET 0x04000000
    -
    -/*
    - * Declarations of hardware specific initialisation functions.
    - */
    -
    -extern struct pci_bus_info *init_hades_pci(void);
    -
    -/*
    - * Bus info structure of the PCI bus. A pointer to this structure is
    - * put in the sysdata member of the pci_bus structure.
    - */
    -
    -static struct pci_bus_info *bus_info;
    -
    -static int pci_modify = 1; /* If set, layout the PCI bus ourself. */
    -static int skip_vga; /* If set do not modify base addresses
    - of vga cards.*/
    -static int disable_pci_burst; /* If set do not allow PCI bursts. */
    -
    -static unsigned int io_base;
    -static unsigned int mem_base;
    -
    -/*
    - * static void disable_dev(struct pci_dev *dev)
    - *
    - * Disable PCI device DEV so that it does not respond to I/O or memory
    - * accesses.
    - *
    - * Parameters:
    - *
    - * dev - device to disable.
    - */
    -
    -static void __init disable_dev(struct pci_dev *dev)
    -{
    - unsigned short cmd;
    -
    - if (((dev->class >> 8 == PCI_CLASS_NOT_DEFINED_VGA) ||
    - (dev->class >> 8 == PCI_CLASS_DISPLAY_VGA) ||
    - (dev->class >> 8 == PCI_CLASS_DISPLAY_XGA)) && skip_vga)
    - return;
    -
    - pci_read_config_word(dev, PCI_COMMAND, &cmd);
    -
    - cmd &= (~PCI_COMMAND_IO & ~PCI_COMMAND_MEMORY & ~PCI_COMMAND_MASTER);
    - pci_write_config_word(dev, PCI_COMMAND, cmd);
    -}
    -
    -/*
    - * static void layout_dev(struct pci_dev *dev)
    - *
    - * Layout memory and I/O for a device.
    - *
    - * Parameters:
    - *
    - * device - device to layout memory and I/O for.
    - */
    -
    -static void __init layout_dev(struct pci_dev *dev)
    -{
    - unsigned short cmd;
    - unsigned int base, mask, size, reg;
    - unsigned int alignto;
    - int i;
    -
    - /*
    - * Skip video cards if requested.
    - */
    -
    - if (((dev->class >> 8 == PCI_CLASS_NOT_DEFINED_VGA) ||
    - (dev->class >> 8 == PCI_CLASS_DISPLAY_VGA) ||
    - (dev->class >> 8 == PCI_CLASS_DISPLAY_XGA)) && skip_vga)
    - return;
    -
    - pci_read_config_word(dev, PCI_COMMAND, &cmd);
    -
    - for (reg = PCI_BASE_ADDRESS_0, i = 0; reg <= PCI_BASE_ADDRESS_5; reg += 4, i++)
    - {
    - /*
    - * Figure out how much space and of what type this
    - * device wants.
    - */
    -
    - pci_write_config_dword(dev, reg, 0xffffffff);
    - pci_read_config_dword(dev, reg, &base);
    -
    - if (!base)
    - {
    - /* this base-address register is unused */
    - dev->resource[i].start = 0;
    - dev->resource[i].end = 0;
    - dev->resource[i].flags = 0;
    - continue;
    - }
    -
    - /*
    - * We've read the base address register back after
    - * writing all ones and so now we must decode it.
    - */
    -
    - if (base & PCI_BASE_ADDRESS_SPACE_IO)
    - {
    - /*
    - * I/O space base address register.
    - */
    -
    - cmd |= PCI_COMMAND_IO;
    -
    - base &= PCI_BASE_ADDRESS_IO_MASK;
    - mask = (~base << 1) | 0x1;
    - size = (mask & base) & 0xffffffff;
    -
    - /*
    - * Align to multiple of size of minimum base.
    - */
    -
    - alignto = max_t(unsigned int, 0x040, size);
    - base = ALIGN(io_base, alignto);
    - io_base = base + size;
    - pci_write_config_dword(dev, reg, base | PCI_BASE_ADDRESS_SPACE_IO);
    -
    - dev->resource[i].start = base;
    - dev->resource[i].end = dev->resource[i].start + size - 1;
    - dev->resource[i].flags = IORESOURCE_IO | PCI_BASE_ADDRESS_SPACE_IO;
    -
    - DBG_DEVS(("layout_dev: IO address: %lX\n", base));
    - }
    - else
    - {
    - unsigned int type;
    -
    - /*
    - * Memory space base address register.
    - */
    -
    - cmd |= PCI_COMMAND_MEMORY;
    - type = base & PCI_BASE_ADDRESS_MEM_TYPE_MASK;
    - base &= PCI_BASE_ADDRESS_MEM_MASK;
    - mask = (~base << 1) | 0x1;
    - size = (mask & base) & 0xffffffff;
    - switch (type)
    - {
    - case PCI_BASE_ADDRESS_MEM_TYPE_32:
    - case PCI_BASE_ADDRESS_MEM_TYPE_64:
    - break;
    -
    - case PCI_BASE_ADDRESS_MEM_TYPE_1M:
    - printk("bios32 WARNING: slot %d, function %d "
    - "requests memory below 1MB---don't "
    - "know how to do that.\n",
    - PCI_SLOT(dev->devfn),
    - PCI_FUNC(dev->devfn));
    - continue;
    - }
    -
    - /*
    - * Align to multiple of size of minimum base.
    - */
    -
    - alignto = max_t(unsigned int, 0x1000, size);
    - base = ALIGN(mem_base, alignto);
    - mem_base = base + size;
    - pci_write_config_dword(dev, reg, base);
    -
    - dev->resource[i].start = base;
    - dev->resource[i].end = dev->resource[i].start + size - 1;
    - dev->resource[i].flags = IORESOURCE_MEM;
    -
    - if (type == PCI_BASE_ADDRESS_MEM_TYPE_64)
    - {
    - /*
    - * 64-bit address, set the highest 32 bits
    - * to zero.
    - */
    -
    - reg += 4;
    - pci_write_config_dword(dev, reg, 0);
    -
    - i++;
    - dev->resource[i].start = 0;
    - dev->resource[i].end = 0;
    - dev->resource[i].flags = 0;
    - }
    - }
    - }
    -
    - /*
    - * Enable device:
    - */
    -
    - if (dev->class >> 8 == PCI_CLASS_NOT_DEFINED ||
    - dev->class >> 8 == PCI_CLASS_NOT_DEFINED_VGA ||
    - dev->class >> 8 == PCI_CLASS_DISPLAY_VGA ||
    - dev->class >> 8 == PCI_CLASS_DISPLAY_XGA)
    - {
    - /*
    - * All of these (may) have I/O scattered all around
    - * and may not use i/o-base address registers at all.
    - * So we just have to always enable I/O to these
    - * devices.
    - */
    - cmd |= PCI_COMMAND_IO;
    - }
    -
    - pci_write_config_word(dev, PCI_COMMAND, cmd | PCI_COMMAND_MASTER);
    -
    - pci_write_config_byte(dev, PCI_LATENCY_TIMER, (disable_pci_burst) ? 0 : 32);
    -
    - if (bus_info != NULL)
    - bus_info->conf_device(dev); /* Machine dependent configuration. */
    -
    - DBG_DEVS(("layout_dev: bus %d slot 0x%x VID 0x%x DID 0x%x class 0x%x\n",
    - dev->bus->number, PCI_SLOT(dev->devfn), dev->vendor, dev->device, dev->class));
    -}
    -
    -/*
    - * static void layout_bus(struct pci_bus *bus)
    - *
    - * Layout memory and I/O for all devices on the given bus.
    - *
    - * Parameters:
    - *
    - * bus - bus.
    - */
    -
    -static void __init layout_bus(struct pci_bus *bus)
    -{
    - unsigned int bio, bmem;
    - struct pci_dev *dev;
    -
    - DBG_DEVS(("layout_bus: starting bus %d\n", bus->number));
    -
    - if (!bus->devices && !bus->children)
    - return;
    -
    - /*
    - * Align the current bases on appropriate boundaries (4K for
    - * IO and 1MB for memory).
    - */
    -
    - bio = io_base = ALIGN(io_base, 4*KB);
    - bmem = mem_base = ALIGN(mem_base, 1*MB);
    -
    - /*
    - * PCI devices might have been setup by a PCI BIOS emulation
    - * running under TOS. In these cases there is a
    - * window during which two devices may have an overlapping
    - * address range. To avoid this causing trouble, we first
    - * turn off the I/O and memory address decoders for all PCI
    - * devices. They'll be re-enabled only once all address
    - * decoders are programmed consistently.
    - */
    -
    - DBG_DEVS(("layout_bus: disable_dev for bus %d\n", bus->number));
    -
    - for (dev = bus->devices; dev; dev = dev->sibling)
    - {
    - if ((dev->class >> 16 != PCI_BASE_CLASS_BRIDGE) ||
    - (dev->class >> 8 == PCI_CLASS_BRIDGE_PCMCIA))
    - disable_dev(dev);
    - }
    -
    - /*
    - * Allocate space to each device:
    - */
    -
    - DBG_DEVS(("layout_bus: starting bus %d devices\n", bus->number));
    -
    - for (dev = bus->devices; dev; dev = dev->sibling)
    - {
    - if ((dev->class >> 16 != PCI_BASE_CLASS_BRIDGE) ||
    - (dev->class >> 8 == PCI_CLASS_BRIDGE_PCMCIA))
    - layout_dev(dev);
    - }
    -
    - DBG_DEVS(("layout_bus: bus %d finished\n", bus->number));
    -}
    -
    -/*
    - * static void pcibios_fixup(void)
    - *
    - * Layout memory and I/O of all devices on the PCI bus if 'pci_modify' is
    - * true. This might be necessary because not every m68k machine with a PCI
    - * bus has a PCI BIOS. This function should be called right after
    - * pci_scan_bus() in pcibios_init().
    - */
    -
    -static void __init pcibios_fixup(void)
    -{
    - if (pci_modify)
    - {
    - /*
    - * Set base addresses for allocation of I/O and memory space.
    - */
    -
    - io_base = bus_info->io_space.start + IO_ALLOC_OFFSET;
    - mem_base = bus_info->mem_space.start + MEM_ALLOC_OFFSET;
    -
    - /*
    - * Scan the tree, allocating PCI memory and I/O space.
    - */
    -
    - layout_bus(pci_bus_b(pci_root.next));
    - }
    -
    - /*
    - * Fix interrupt assignments, etc.
    - */
    -
    - bus_info->fixup(pci_modify);
    -}
    -
    -/*
    - * static void pcibios_claim_resources(struct pci_bus *bus)
    - *
    - * Claim all resources that are assigned to devices on the given bus.
    - *
    - * Parameters:
    - *
    - * bus - bus.
    - */
    -
    -static void __init pcibios_claim_resources(struct pci_bus *bus)
    -{
    - struct pci_dev *dev;
    - int i;
    -
    - while (bus)
    - {
    - for (dev = bus->devices; (dev != NULL); dev = dev->sibling)
    - {
    - for (i = 0; i < PCI_NUM_RESOURCES; i++)
    - {
    - struct resource *r = &dev->resource[i];
    - struct resource *pr;
    - struct pci_bus_info *bus_info = (struct pci_bus_info *) dev->sysdata;
    -
    - if ((r->start == 0) || (r->parent != NULL))
    - continue;
    -#if 1
    - if (r->flags & IORESOURCE_IO)
    - pr = &bus_info->io_space;
    - else
    - pr = &bus_info->mem_space;
    -#else
    - if (r->flags & IORESOURCE_IO)
    - pr = &ioport_resource;
    - else
    - pr = &iomem_resource;
    -#endif
    - if (request_resource(pr, r) < 0)
    - {
    - printk(KERN_ERR "PCI: Address space collision on region %d of device %s\n", i, dev->name);
    - }
    - }
    - }
    -
    - if (bus->children)
    - pcibios_claim_resources(bus->children);
    -
    - bus = bus->next;
    - }
    -}
    -
    -/*
    - * int pcibios_assign_resource(struct pci_dev *dev, int i)
    - *
    - * Assign a new address to a PCI resource.
    - *
    - * Parameters:
    - *
    - * dev - device.
    - * i - resource.
    - *
    - * Result: 0 if successful.
    - */
    -
    -int __init pcibios_assign_resource(struct pci_dev *dev, int i)
    -{
    - struct resource *r = &dev->resource[i];
    - struct resource *pr = pci_find_parent_resource(dev, r);
    - unsigned long size = r->end + 1;
    -
    - if (!pr)
    - return -EINVAL;
    -
    - if (r->flags & IORESOURCE_IO)
    - {
    - if (size > 0x100)
    - return -EFBIG;
    -
    - if (allocate_resource(pr, r, size, bus_info->io_space.start +
    - IO_ALLOC_OFFSET, bus_info->io_space.end, 1024))
    - return -EBUSY;
    - }
    - else
    - {
    - if (allocate_resource(pr, r, size, bus_info->mem_space.start +
    - MEM_ALLOC_OFFSET, bus_info->mem_space.end, size))
    - return -EBUSY;
    - }
    -
    - if (i < 6)
    - pci_write_config_dword(dev, PCI_BASE_ADDRESS_0 + 4 * i, r->start);
    -
    - return 0;
    -}
    -
    -void __init pcibios_fixup_bus(struct pci_bus *bus)
    -{
    - struct pci_dev *dev;
    - void *sysdata;
    -
    - sysdata = (bus->parent) ? bus->parent->sysdata : bus->sysdata;
    -
    - for (dev = bus->devices; (dev != NULL); dev = dev->sibling)
    - dev->sysdata = sysdata;
    -}
    -
    -void __init pcibios_init(void)
    -{
    - printk("Linux/m68k PCI BIOS32 revision %x.%02x\n", MAJOR_REV, MINOR_REV);
    -
    - bus_info = NULL;
    -
    -/* Hades code was:
    - if (MACH_IS_HADES)
    - bus_info = init_hades_pci();
    -*/
    -
    - if (bus_info != NULL)
    - {
    - printk("PCI: Probing PCI hardware\n");
    - pci_scan_bus(0, bus_info->m68k_pci_ops, bus_info);
    - pcibios_fixup();
    - pcibios_claim_resources(pci_root);
    - }
    - else
    - printk("PCI: No PCI bus detected\n");
    -}
    -
    -char * __init pcibios_setup(char *str)
    -{
    - if (!strcmp(str, "nomodify"))
    - {
    - pci_modify = 0;
    - return NULL;
    - }
    - else if (!strcmp(str, "skipvga"))
    - {
    - skip_vga = 1;
    - return NULL;
    - }
    - else if (!strcmp(str, "noburst"))
    - {
    - disable_pci_burst = 1;
    - return NULL;
    - }
    -
    - return str;
    -}
    -#endif /* CONFIG_PCI */
    --- a/include/asm-m68k/dma.h
    +++ b/include/asm-m68k/dma.h
    @@ -11,10 +11,6 @@
    extern int request_dma(unsigned int dmanr, const char * device_id); /* reserve a DMA channel */
    extern void free_dma(unsigned int dmanr); /* release it again */

    -#ifdef CONFIG_PCI
    -extern int isa_dma_bridge_buggy;
    -#else
    #define isa_dma_bridge_buggy (0)
    -#endif

    #endif /* _M68K_DMA_H */
    --- a/include/asm-m68k/io.h
    +++ b/include/asm-m68k/io.h
    @@ -7,15 +7,12 @@
    * - added skeleton for GG-II and Amiga PCMCIA
    * 2/3/01 RZ: - moved a few more defs into raw_io.h
    *
    - * inX/outX/readX/writeX should not be used by any driver unless it does
    - * ISA or PCI access. Other drivers should use function defined in raw_io.h
    + * inX/outX should not be used by any driver unless it does
    + * ISA access. Other drivers should use function defined in raw_io.h
    * or define its own macros on top of these.
    *
    - * inX(),outX() are for PCI and ISA I/O
    - * readX(),writeX() are for PCI memory
    + * inX(),outX() are for ISA I/O
    * isa_readX(),isa_writeX() are for ISA memory
    - *
    - * moved mem{cpy,set}_*io inside CONFIG_PCI
    */

    #ifndef _IO_H
    @@ -256,10 +253,7 @@ static inline void isa_delay(void)
    (ISA_SEX ? raw_outsl(isa_itl(port), (u32 *)(buf), (nr)) : \
    raw_outsw_swapw(isa_itw(port), (u16 *)(buf), (nr)<<1))

    -#endif /* CONFIG_ISA */
    -

    -#if defined(CONFIG_ISA) && !defined(CONFIG_PCI)
    #define inb isa_inb
    #define inb_p isa_inb_p
    #define outb isa_outb
    @@ -282,55 +276,9 @@ static inline void isa_delay(void)
    #define readw isa_readw
    #define writeb isa_writeb
    #define writew isa_writew
    -#endif /* CONFIG_ISA */

    -#if defined(CONFIG_PCI)
    +#else /* CONFIG_ISA */

    -#define readl(addr) in_le32(addr)
    -#define writel(val,addr) out_le32((addr),(val))
    -
    -/* those can be defined for both ISA and PCI - it won't work though */
    -#define readb(addr) in_8(addr)
    -#define readw(addr) in_le16(addr)
    -#define writeb(val,addr) out_8((addr),(val))
    -#define writew(val,addr) out_le16((addr),(val))
    -
    -#define readb_relaxed(addr) readb(addr)
    -#define readw_relaxed(addr) readw(addr)
    -#define readl_relaxed(addr) readl(addr)
    -
    -#ifndef CONFIG_ISA
    -#define inb(port) in_8(port)
    -#define outb(val,port) out_8((port),(val))
    -#define inw(port) in_le16(port)
    -#define outw(val,port) out_le16((port),(val))
    -#define inl(port) in_le32(port)
    -#define outl(val,port) out_le32((port),(val))
    -
    -#else
    -/*
    - * kernel with both ISA and PCI compiled in, those have
    - * conflicting defs for in/out. Simply consider port < 1024
    - * ISA and everything else PCI. read,write not defined
    - * in this case
    - */
    -#define inb(port) ((port)<1024 ? isa_inb(port) : in_8(port))
    -#define inb_p(port) ((port)<1024 ? isa_inb_p(port) : in_8(port))
    -#define inw(port) ((port)<1024 ? isa_inw(port) : in_le16(port))
    -#define inw_p(port) ((port)<1024 ? isa_inw_p(port) : in_le16(port))
    -#define inl(port) ((port)<1024 ? isa_inl(port) : in_le32(port))
    -#define inl_p(port) ((port)<1024 ? isa_inl_p(port) : in_le32(port))
    -
    -#define outb(val,port) ((port)<1024 ? isa_outb((val),(port)) : out_8((port),(val)))
    -#define outb_p(val,port) ((port)<1024 ? isa_outb_p((val),(port)) : out_8((port),(val)))
    -#define outw(val,port) ((port)<1024 ? isa_outw((val),(port)) : out_le16((port),(val)))
    -#define outw_p(val,port) ((port)<1024 ? isa_outw_p((val),(port)) : out_le16((port),(val)))
    -#define outl(val,port) ((port)<1024 ? isa_outl((val),(port)) : out_le32((port),(val)))
    -#define outl_p(val,port) ((port)<1024 ? isa_outl_p((val),(port)) : out_le32((port),(val)))
    -#endif
    -#endif /* CONFIG_PCI */
    -
    -#if !defined(CONFIG_ISA) && !defined(CONFIG_PCI)
    /*
    * We need to define dummy functions for GENERIC_IOMAP support.
    */
    @@ -357,11 +305,11 @@ static inline void isa_delay(void)
    #define writeb(val,addr) out_8((addr),(val))
    #define readw(addr) in_le16(addr)
    #define writew(val,addr) out_le16((addr),(val))
    -#endif
    -#if !defined(CONFIG_PCI)
    +
    +#endif /* CONFIG_ISA */
    +
    #define readl(addr) in_le32(addr)
    #define writel(val,addr) out_le32((addr),(val))
    -#endif

    #define mmiowb()

    --- a/include/asm-m68k/pci.h
    +++ b/include/asm-m68k/pci.h
    @@ -1,54 +1,8 @@
    #ifndef _ASM_M68K_PCI_H
    #define _ASM_M68K_PCI_H

    -/*
    - * asm-m68k/pci_m68k.h - m68k specific PCI declarations.
    - *
    - * Written by Wout Klaren.
    - */
    -
    -#include
    #include

    -struct pci_ops;
    -
    -/*
    - * Structure with hardware dependent information and functions of the
    - * PCI bus.
    - */
    -
    -struct pci_bus_info
    -{
    - /*
    - * Resources of the PCI bus.
    - */
    -
    - struct resource mem_space;
    - struct resource io_space;
    -
    - /*
    - * System dependent functions.
    - */
    -
    - struct pci_ops *m68k_pci_ops;
    -
    - void (*fixup)(int pci_modify);
    - void (*conf_device)(struct pci_dev *dev);
    -};
    -
    -#define pcibios_assign_all_busses() 0
    -#define pcibios_scan_all_fns(a, b) 0
    -
    -static inline void pcibios_set_master(struct pci_dev *dev)
    -{
    - /* No special bus mastering setup handling */
    -}
    -
    -static inline void pcibios_penalize_isa_irq(int irq, int active)
    -{
    - /* We don't do dynamic PCI IRQ allocation */
    -}
    -
    /* The PCI address space does equal the physical memory
    * address space. The networking and block device layers use
    * this boolean for bounce buffer decisions.

    --
    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 from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  9. [patch 15/18] m68k: init_irq_proc depends on CONFIG_PROC_FS

    From: Geert Uytterhoeven

    If CONFIG_PROC_FS is not set, I get:

    | arch/m68k/kernel/ints.c:433: error: redefinition of 'init_irq_proc'
    | include/linux/interrupt.h:438: error: previous definition of 'init_irq_proc' was here

    This was introduced by commit 6168a702ab0be181e5e57a0b2d0e7376f7a47f0b
    ("Declare init_irq_proc before we use it."), which replaced the #ifdef
    protection of the init_irq_proc() call by a static inline dummy if
    CONFIG_PROC_FS is not set.

    Make init_irq_proc() depend on CONFIG_PROC_FS to fix this.

    Signed-off-by: Geert Uytterhoeven
    ---
    arch/m68k/kernel/ints.c | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    --- a/arch/m68k/kernel/ints.c
    +++ b/arch/m68k/kernel/ints.c
    @@ -429,8 +429,9 @@ int show_interrupts(struct seq_file *p,
    return 0;
    }

    +#ifdef CONFIG_PROC_FS
    void init_irq_proc(void)
    {
    /* Insert /proc/irq driver here */
    }
    -
    +#endif

    --
    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 from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  10. [patch 17/18] net/rfkill/rfkill-input.c needs <linux/sched.h>

    From: Geert Uytterhoeven

    For some m68k configs, I get:

    | net/rfkill/rfkill-input.c: In function 'rfkill_start':
    | net/rfkill/rfkill-input.c:208: error: dereferencing pointer to incomplete type

    As the incomplete type is `struct task_struct', including fixes
    it.

    Signed-off-by: Geert Uytterhoeven
    ---
    net/rfkill/rfkill-input.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/net/rfkill/rfkill-input.c
    +++ b/net/rfkill/rfkill-input.c
    @@ -16,6 +16,7 @@
    #include
    #include
    #include
    +#include

    #include "rfkill-input.h"


    --
    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 from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  11. [patch 04/18] m68k: Add NOTES to init data so its discarded at boot

    From: Roman Zippel

    Add .note.gnu.build-id to init data so it's discarded at boot.

    [Andreas Schwab] Use NOTES macro

    Signed-off-by: Roman Zippel
    Signed-off-by: Geert Uytterhoeven
    ---
    arch/m68k/kernel/vmlinux-std.lds | 1 +
    1 file changed, 1 insertion(+)

    --- a/arch/m68k/kernel/vmlinux-std.lds
    +++ b/arch/m68k/kernel/vmlinux-std.lds
    @@ -74,6 +74,7 @@ SECTIONS
    .init.ramfs : { *(.init.ramfs) }
    __initramfs_end = .;
    #endif
    + NOTES
    . = ALIGN(8192);
    __init_end = .;


    --
    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 from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  12. Re: [patch 17/18] net/rfkill/rfkill-input.c needs <linux/sched.h>

    On Mon, 13 Oct 2008, Geert Uytterhoeven wrote:
    > From: Geert Uytterhoeven
    >
    > For some m68k configs, I get:
    >
    > | net/rfkill/rfkill-input.c: In function 'rfkill_start':
    > | net/rfkill/rfkill-input.c:208: error: dereferencing pointer to incomplete type
    >
    > As the incomplete type is `struct task_struct', including fixes
    > it.


    Line 208 is this (in latest Linus mainline and also v2.6.27):

    spin_unlock_irq(&handle->dev->event_lock);

    So we need to include sched.h to everything that uses spin_unlock_irq? If
    only some variants of m68k need that, shouldn't it have been added on the
    header that defines spin_unlock_irq() on those arches, instead?

    Or am I looking at a different version of rfkill-input.c than what you based
    that error message on?

    --
    "One disk to rule them all, One disk to find them. One disk to bring
    them all and in the darkness grind them. In the Land of Redmond
    where the shadows lie." -- The Silicon Valley Tarot
    Henrique Holschuh
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  13. Re: [patch 06/18] m68k: Disable Amiga serial console support if modular

    On Mon, 2008-10-13 at 21:58 +0200, Geert Uytterhoeven wrote:
    > Apparently console_initcall() is not defined in the modular case.


    Yes, see include/linux/init.h:
    #ifndef MODULE
    [...]
    #define console_initcall(fn) \
    static initcall_t __initcall_##fn \
    __used __section(.con_initcall.init) = fn
    [...]

    > Any better alternative fix?


    Well, (a number of) other serial consoles cannot be selected if the
    corresponding serial driver is modular. Try:
    grep -B 2 -E "depends on .*=y" drivers/serial/Kconfig | \
    grep -A 2 -E "^config .*CONSOLE"

    For instance:
    config SERIAL_8250_CONSOLE
    bool "Console on 8250/16550 and compatible serial port"
    depends on SERIAL_8250=y

    Maybe this config entry (in arch/m68k/Kconfig) could be cleaned up (or
    split into multiple entries):
    config SERIAL_CONSOLE
    bool "Support for serial port console"
    depends on (AMIGA || ATARI || MAC || SUN3 || SUN3X || VME ||
    APOLLO) && (ATARI_MFPSER=y || ATARI_MIDI=y || MAC_SCC=y ||
    AMIGA_BUILTIN_SERIAL=y || GVPIOEXT=y || MULTIFACE_III_TTY=y || SERIAL=y
    || MVME147_SCC || SERIAL167 || MVME162_SCC || BVME6000_SCC || DN_SERIAL)
    [...]

    That "depends on" line seems likely to lead to problems like the one you
    ran into. But your patch (which I didn't test) is probably simpler.


    Paul Bolle

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  14. Re: [patch 17/18] net/rfkill/rfkill-input.c needs <linux/sched.h>

    On Mon, 13 Oct 2008, Henrique de Moraes Holschuh wrote:
    > On Mon, 13 Oct 2008, Geert Uytterhoeven wrote:
    > > | net/rfkill/rfkill-input.c: In function 'rfkill_start':
    > > | net/rfkill/rfkill-input.c:208: error: dereferencing pointer to incomplete type
    > >
    > > As the incomplete type is `struct task_struct', including fixes
    > > it.

    >
    > Line 208 is this (in latest Linus mainline and also v2.6.27):
    >
    > spin_unlock_irq(&handle->dev->event_lock);
    >
    > So we need to include sched.h to everything that uses spin_unlock_irq? If


    Never mind, I didn't check if the problem is with the argument to
    spin_unlock_irq(), but the question remains...

    > only some variants of m68k need that, shouldn't it have been added on the
    > header that defines spin_unlock_irq() on those arches, instead?
    >
    > Or am I looking at a different version of rfkill-input.c than what you based
    > that error message on?


    --
    "One disk to rule them all, One disk to find them. One disk to bring
    them all and in the darkness grind them. In the Land of Redmond
    where the shadows lie." -- The Silicon Valley Tarot
    Henrique Holschuh
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  15. Re: [patch 17/18] net/rfkill/rfkill-input.c needs <linux/sched.h>

    On Mon, 13 Oct 2008, Henrique de Moraes Holschuh wrote:
    > On Mon, 13 Oct 2008, Geert Uytterhoeven wrote:
    > > From: Geert Uytterhoeven
    > >
    > > For some m68k configs, I get:
    > >
    > > | net/rfkill/rfkill-input.c: In function 'rfkill_start':
    > > | net/rfkill/rfkill-input.c:208: error: dereferencing pointer to incomplete type
    > >
    > > As the incomplete type is `struct task_struct', including fixes
    > > it.

    >
    > Line 208 is this (in latest Linus mainline and also v2.6.27):
    >
    > spin_unlock_irq(&handle->dev->event_lock);
    >
    > So we need to include sched.h to everything that uses spin_unlock_irq? If
    > only some variants of m68k need that, shouldn't it have been added on the
    > header that defines spin_unlock_irq() on those arches, instead?


    Unfortunately that's not possible, due to Include Hell(tm).
    Therefore, including is the way this has been fixed in
    the past.

    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 from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  16. Re: [patch 06/18] m68k: Disable Amiga serial console support if modular

    On Mon, 13 Oct 2008, Paul Bolle wrote:
    > On Mon, 2008-10-13 at 21:58 +0200, Geert Uytterhoeven wrote:
    > > Apparently console_initcall() is not defined in the modular case.

    >
    > Yes, see include/linux/init.h:
    > #ifndef MODULE
    > [...]
    > #define console_initcall(fn) \
    > static initcall_t __initcall_##fn \
    > __used __section(.con_initcall.init) = fn
    > [...]
    >
    > > Any better alternative fix?

    >
    > Well, (a number of) other serial consoles cannot be selected if the
    > corresponding serial driver is modular. Try:
    > grep -B 2 -E "depends on .*=y" drivers/serial/Kconfig | \
    > grep -A 2 -E "^config .*CONSOLE"
    >
    > For instance:
    > config SERIAL_8250_CONSOLE
    > bool "Console on 8250/16550 and compatible serial port"
    > depends on SERIAL_8250=y


    Yes, I saw those.

    > Maybe this config entry (in arch/m68k/Kconfig) could be cleaned up (or
    > split into multiple entries):
    > config SERIAL_CONSOLE
    > bool "Support for serial port console"
    > depends on (AMIGA || ATARI || MAC || SUN3 || SUN3X || VME ||
    > APOLLO) && (ATARI_MFPSER=y || ATARI_MIDI=y || MAC_SCC=y ||
    > AMIGA_BUILTIN_SERIAL=y || GVPIOEXT=y || MULTIFACE_III_TTY=y || SERIAL=y
    > || MVME147_SCC || SERIAL167 || MVME162_SCC || BVME6000_SCC || DN_SERIAL)
    > [...]
    >
    > That "depends on" line seems likely to lead to problems like the one you
    > ran into. But your patch (which I didn't test) is probably simpler.


    Adding all those extra config symbols seems like a bit overkill to me...

    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 from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  17. Re: [patch 06/18] m68k: Disable Amiga serial console support if modular



    On Mon, 13 Oct 2008, Geert Uytterhoeven wrote:
    >
    > Apparently console_initcall() is not defined in the modular case.


    We can certainly fix that.

    Does this make things work for you? If so, send it back with a sign-off
    (add you can add mine too - but I'm not going to add it until it's tested)

    Linus
    ---
    include/linux/init.h | 1 +
    1 files changed, 1 insertions(+), 0 deletions(-)

    diff --git a/include/linux/init.h b/include/linux/init.h
    index 93538b6..d9625b5 100644
    --- a/include/linux/init.h
    +++ b/include/linux/init.h
    @@ -273,6 +273,7 @@ void __init parse_early_param(void);
    #else /* MODULE */

    /* Don't use these in modules, but some people do... */
    +#define console_initcall(fn) module_init(fn)
    #define core_initcall(fn) module_init(fn)
    #define postcore_initcall(fn) module_init(fn)
    #define arch_initcall(fn) module_init(fn)
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  18. Re: [patch 06/18] m68k: Disable Amiga serial console support if modular

    Hi Linus,

    On Tue, 14 Oct 2008, Linus Torvalds wrote:
    > On Mon, 13 Oct 2008, Geert Uytterhoeven wrote:
    > > Apparently console_initcall() is not defined in the modular case.

    >
    > We can certainly fix that.
    >
    > Does this make things work for you? If so, send it back with a sign-off
    > (add you can add mine too - but I'm not going to add it until it's tested)
    >
    > Linus
    > ---
    > include/linux/init.h | 1 +
    > 1 files changed, 1 insertions(+), 0 deletions(-)
    >
    > diff --git a/include/linux/init.h b/include/linux/init.h
    > index 93538b6..d9625b5 100644
    > --- a/include/linux/init.h
    > +++ b/include/linux/init.h
    > @@ -273,6 +273,7 @@ void __init parse_early_param(void);
    > #else /* MODULE */
    >
    > /* Don't use these in modules, but some people do... */
    > +#define console_initcall(fn) module_init(fn)
    > #define core_initcall(fn) module_init(fn)
    > #define postcore_initcall(fn) module_init(fn)
    > #define arch_initcall(fn) module_init(fn)


    That won't help amiserial.c, as there's already a module_init() in that
    file for the normal serial driver part.

    But even if it would work, does it really make sense to have a modular
    serial console driver?

    - If you have only one console driver, it would be registered and become
    your console when you load the module; but you wouldn't have had any
    console before it got loaded.
    - If you have several console drivers, you need a `console=' parameter
    anyway to control which one is used.

    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 from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  19. Re: [patch 17/18] net/rfkill/rfkill-input.c needs <linux/sched.h>

    On Tue, 14 Oct 2008, Geert Uytterhoeven wrote:
    > Unfortunately that's not possible, due to Include Hell(tm).
    > Therefore, including is the way this has been fixed in
    > the past.


    I see. Well, when doing this I'd suggest adding a comment, otherwise the
    include could end up getting removed sooner or later without anyone asking
    linux-m68k first (I seriously douby anyone will do git blame to find out why
    an #include line exists before removing it).

    Something like:
    #include /* m68k needs task_struct for */

    --
    "One disk to rule them all, One disk to find them. One disk to bring
    them all and in the darkness grind them. In the Land of Redmond
    where the shadows lie." -- The Silicon Valley Tarot
    Henrique Holschuh
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  20. Re: [patch 17/18] net/rfkill/rfkill-input.c needs <linux/sched.h>

    On Wed, 15 Oct 2008, Henrique de Moraes Holschuh wrote:
    > On Tue, 14 Oct 2008, Geert Uytterhoeven wrote:
    > > Unfortunately that's not possible, due to Include Hell(tm).
    > > Therefore, including is the way this has been fixed in
    > > the past.

    >
    > I see. Well, when doing this I'd suggest adding a comment, otherwise the
    > include could end up getting removed sooner or later without anyone asking
    > linux-m68k first (I seriously douby anyone will do git blame to find out why
    > an #include line exists before removing it).
    >
    > Something like:
    > #include /* m68k needs task_struct for */


    Probably we should start looking again into extracting struct
    task_struct into its own header file, cfr. what Roman Zippel did a long
    time ago...

    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 from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread
Page 1 of 2 1 2 LastLast