* [patch 00/29] m68k patches for 2.6.27
@ 2008-07-17 19:16 Geert Uytterhoeven
2008-07-17 19:16 ` [patch 01/29] m68k: remove CVS keywords Geert Uytterhoeven
` (28 more replies)
0 siblings, 29 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel
Hi Linus, Andrew,
Here are the m68k patches for 2.6.27:
[01] m68k: remove CVS keywords
[02] ariadne: use netstats in net_device structure
[03] m68k: Return -ENODEV if no device is found
[04] m68k: vmlinux-std/sun3.lds.S cleanup - use PAGE_SIZE macro
[05] m68k: Allow no CPU/platform type for allnoconfig
[06] m68k: remove -traditional [RFC patch 4/9] Re: [PATCH] Stringify support commas
[07] m68k: make multi_defconfig the default defconfig
[08] m68k: remove AP1000 code
[09] ZORRO: Replace deprecated __initcall with equivalent device_initcall.
[10] zorro: use memory_read_from_buffer
[11] amifb: Register Amiga-specific video modes with sysfs
[12] atafb: Register Atari-specific video modes with sysfs
[13] drivers/video/c2p.c: add MODULE_LICENSE
[14] export amiga_vblank
[15] export c2p
[16] m68k/amiga/: possible cleanups
[17] m68k/atari/debug.c: possible cleanups
[18] m68k/mac/: possible cleanups
[19] m68k/q40/config.c: make functions static
[20] m68k/sun3/: possible cleanups
[21] m68k: remove stale ARCH_SUN4 #define
[22] m68k/apollo: Add missing call to apollo_parse_bootinfo()
[23] m68k/Mac: remove the unused ADB_KEYBOARD option
[24] m68k/Atari: remove the dead ATARI_SCC{,_DMA} options
[25] m68k/Apollo: remove the unused APOLLO_ELPLUS option
[26] arch/m68k/mm/motorola.c: Eliminate NULL test and memset after alloc_bootmem
[27] arch/m68k/mm/sun3mmu.c: Eliminate NULL test and memset after alloc_bootmem
[28] dio: use dio_match_device() in dio_bus_match()
[29] initrd: Fix virtual/physical mix-up in overwrite test
All of them have been submitted for review before. Please apply.
Thanks a lot!
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] 38+ messages in thread
* [patch 01/29] m68k: remove CVS keywords
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 02/29] ariadne: use netstats in net_device structure Geert Uytterhoeven
` (27 subsequent siblings)
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel, Adrian Bunk
[-- Attachment #1: m68k-remove-CVS-keywords.diff --]
[-- Type: text/plain, Size: 5311 bytes --]
From: Adrian Bunk <bunk@kernel.org>
This patch removes CVS keywords that weren't updated for a long time
from comments.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
arch/m68k/sun3/idprom.c | 2 +-
arch/m68k/sun3/prom/Makefile | 1 -
arch/m68k/sun3/prom/console.c | 2 +-
arch/m68k/sun3/prom/init.c | 2 +-
arch/m68k/sun3/prom/misc.c | 2 +-
arch/m68k/sun3/prom/printf.c | 2 +-
drivers/zorro/proc.c | 2 --
drivers/zorro/zorro.c | 2 --
drivers/zorro/zorro.ids | 2 --
include/asm-m68k/apollodma.h | 2 +-
include/asm-m68k/dvma.h | 2 +-
include/asm-m68k/machines.h | 2 +-
include/asm-m68k/md.h | 2 +-
include/asm-m68k/openprom.h | 1 -
include/asm-m68k/oplib.h | 2 +-
include/asm-m68k/sun3-head.h | 1 -
16 files changed, 10 insertions(+), 19 deletions(-)
ee8fd7a1ce8ef99adde70ee370963c29bebdde2a diff --git a/arch/m68k/sun3/idprom.c b/arch/m68k/sun3/idprom.c
index dca6ab6..6c5336d 100644
--- a/arch/m68k/sun3/idprom.c
+++ b/arch/m68k/sun3/idprom.c
@@ -1,4 +1,4 @@
-/* $Id: idprom.c,v 1.22 1996/11/13 05:09:25 davem Exp $
+/*
* idprom.c: Routines to load the idprom into kernel addresses and
* interpret the data contained within.
*
--- a/arch/m68k/sun3/prom/Makefile
+++ b/arch/m68k/sun3/prom/Makefile
@@ -1,4 +1,3 @@
-# $Id: Makefile,v 1.5 1995/11/25 00:59:48 davem Exp $
# Makefile for the Sun Boot PROM interface library under
# Linux.
#
--- a/arch/m68k/sun3/prom/console.c
+++ b/arch/m68k/sun3/prom/console.c
@@ -1,4 +1,4 @@
-/* $Id: console.c,v 1.10 1996/12/18 06:46:54 tridge Exp $
+/*
* console.c: Routines that deal with sending and receiving IO
* to/from the current console device using the PROM.
*
--- a/arch/m68k/sun3/prom/init.c
+++ b/arch/m68k/sun3/prom/init.c
@@ -1,4 +1,4 @@
-/* $Id: init.c,v 1.9 1996/12/18 06:46:55 tridge Exp $
+/*
* init.c: Initialize internal variables used by the PROM
* library functions.
*
--- a/arch/m68k/sun3/prom/misc.c
+++ b/arch/m68k/sun3/prom/misc.c
@@ -1,4 +1,4 @@
-/* $Id: misc.c,v 1.15 1997/05/14 20:45:00 davem Exp $
+/*
* misc.c: Miscellaneous prom functions that don't belong
* anywhere else.
*
--- a/arch/m68k/sun3/prom/printf.c
+++ b/arch/m68k/sun3/prom/printf.c
@@ -1,4 +1,4 @@
-/* $Id: printf.c,v 1.5 1996/04/04 16:31:07 tridge Exp $
+/*
* printf.c: Internal prom library printf facility.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
--- a/drivers/zorro/proc.c
+++ b/drivers/zorro/proc.c
@@ -1,6 +1,4 @@
/*
- * $Id: proc.c,v 1.1.2.1 1998/06/07 23:21:01 geert Exp $
- *
* Procfs interface for the Zorro bus.
*
* Copyright (C) 1998-2003 Geert Uytterhoeven
--- a/drivers/zorro/zorro.c
+++ b/drivers/zorro/zorro.c
@@ -1,6 +1,4 @@
/*
- * $Id: zorro.c,v 1.1.2.1 1998/06/07 23:21:02 geert Exp $
- *
* Zorro Bus Services
*
* Copyright (C) 1995-2003 Geert Uytterhoeven
--- a/drivers/zorro/zorro.ids
+++ b/drivers/zorro/zorro.ids
@@ -4,8 +4,6 @@
# Maintained by Geert Uytterhoeven <zorro@linux-m68k.org>
# If you have any new entries, please send them to the maintainer.
#
-# $Id: zorro.ids,v 1.19 2002/10/14 13:08:58 geert Exp $
-#
# Manufacturers and Products. Please keep sorted.
--- a/include/asm-m68k/apollodma.h
+++ b/include/asm-m68k/apollodma.h
@@ -1,4 +1,4 @@
-/* $Id: dma.h,v 1.7 1992/12/14 00:29:34 root Exp root $
+/*
* linux/include/asm/dma.h: Defines for using and allocating dma channels.
* Written by Hennus Bergman, 1992.
* High DMA channel support & info by Hannu Savolainen
--- a/include/asm-m68k/dvma.h
+++ b/include/asm-m68k/dvma.h
@@ -1,4 +1,4 @@
-/* $Id: dvma.h,v 1.4 1999/03/27 20:23:41 tsbogend Exp $
+/*
* include/asm-m68k/dma.h
*
* Copyright 1995 (C) David S. Miller (davem@caip.rutgers.edu)
--- a/include/asm-m68k/machines.h
+++ b/include/asm-m68k/machines.h
@@ -1,4 +1,4 @@
-/* $Id: machines.h,v 1.4 1995/11/25 02:31:58 davem Exp $
+/*
* machines.h: Defines for taking apart the machine type value in the
* idprom and determining the kind of machine we are on.
*
--- a/include/asm-m68k/md.h
+++ b/include/asm-m68k/md.h
@@ -1,4 +1,4 @@
-/* $Id: md.h,v 1.1 1997/12/15 15:12:04 jj Exp $
+/*
* md.h: High speed xor_block operation for RAID4/5
*
*/
--- a/include/asm-m68k/openprom.h
+++ b/include/asm-m68k/openprom.h
@@ -1,4 +1,3 @@
-/* $Id: openprom.h,v 1.19 1996/09/25 03:51:08 davem Exp $ */
#ifndef __SPARC_OPENPROM_H
#define __SPARC_OPENPROM_H
--- a/include/asm-m68k/oplib.h
+++ b/include/asm-m68k/oplib.h
@@ -1,4 +1,4 @@
-/* $Id: oplib.h,v 1.12 1996/10/31 06:29:13 davem Exp $
+/*
* oplib.h: Describes the interface and available routines in the
* Linux Prom library.
*
--- a/include/asm-m68k/sun3-head.h
+++ b/include/asm-m68k/sun3-head.h
@@ -1,4 +1,3 @@
-/* $Id: head.h,v 1.32 1996/12/04 00:12:48 ecd Exp $ */
#ifndef __SUN3_HEAD_H
#define __SUN3_HEAD_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
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [patch 02/29] ariadne: use netstats in net_device structure
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
2008-07-17 19:16 ` [patch 01/29] m68k: remove CVS keywords Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:45 ` Jeff Garzik
2008-07-17 19:16 ` [patch 03/29] m68k: Return -ENODEV if no device is found Geert Uytterhoeven
` (26 subsequent siblings)
28 siblings, 1 reply; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: linux-m68k, linux-kernel, linux-net, Paulius Zaleckas
[-- Attachment #1: m68k-ariadne-use-netstats-in-net_device-structure.diff --]
[-- Type: text/plain, Size: 5746 bytes --]
From: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Use net_device_stats from net_device structure instead of local.
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/net/ariadne.c | 47 ++++++++++++++++++++++-------------------------
1 file changed, 22 insertions(+), 25 deletions(-)
--- a/drivers/net/ariadne.c
+++ b/drivers/net/ariadne.c
@@ -98,7 +98,6 @@ struct ariadne_private {
volatile u_short *rx_buff[RX_RING_SIZE];
int cur_tx, cur_rx; /* The next free ring entry */
int dirty_tx; /* The ring entries to be free()ed. */
- struct net_device_stats stats;
char tx_full;
};
@@ -378,20 +377,19 @@ static void ariadne_init_ring(struct net
static int ariadne_close(struct net_device *dev)
{
- struct ariadne_private *priv = netdev_priv(dev);
volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr;
netif_stop_queue(dev);
lance->RAP = CSR112; /* Missed Frame Count */
- priv->stats.rx_missed_errors = swapw(lance->RDP);
+ dev->stats.rx_missed_errors = swapw(lance->RDP);
lance->RAP = CSR0; /* PCnet-ISA Controller Status */
if (ariadne_debug > 1) {
printk(KERN_DEBUG "%s: Shutting down ethercard, status was %2.2x.\n",
dev->name, lance->RDP);
printk(KERN_DEBUG "%s: %lu packets missed\n", dev->name,
- priv->stats.rx_missed_errors);
+ dev->stats.rx_missed_errors);
}
/* We stop the LANCE here -- it occasionally polls memory if we don't. */
@@ -502,16 +500,16 @@ static irqreturn_t ariadne_interrupt(int
if (status & TF_ERR) {
/* There was an major error, log it. */
int err_status = priv->tx_ring[entry]->TMD3;
- priv->stats.tx_errors++;
+ dev->stats.tx_errors++;
if (err_status & EF_RTRY)
- priv->stats.tx_aborted_errors++;
+ dev->stats.tx_aborted_errors++;
if (err_status & EF_LCAR)
- priv->stats.tx_carrier_errors++;
+ dev->stats.tx_carrier_errors++;
if (err_status & EF_LCOL)
- priv->stats.tx_window_errors++;
+ dev->stats.tx_window_errors++;
if (err_status & EF_UFLO) {
/* Ackk! On FIFO errors the Tx unit is turned off! */
- priv->stats.tx_fifo_errors++;
+ dev->stats.tx_fifo_errors++;
/* Remove this verbosity later! */
printk(KERN_ERR "%s: Tx FIFO error! Status %4.4x.\n",
dev->name, csr0);
@@ -520,8 +518,8 @@ static irqreturn_t ariadne_interrupt(int
}
} else {
if (status & (TF_MORE|TF_ONE))
- priv->stats.collisions++;
- priv->stats.tx_packets++;
+ dev->stats.collisions++;
+ dev->stats.tx_packets++;
}
dirty_tx++;
}
@@ -547,11 +545,11 @@ static irqreturn_t ariadne_interrupt(int
/* Log misc errors. */
if (csr0 & BABL) {
handled = 1;
- priv->stats.tx_errors++; /* Tx babble. */
+ dev->stats.tx_errors++; /* Tx babble. */
}
if (csr0 & MISS) {
handled = 1;
- priv->stats.rx_errors++; /* Missed a Rx frame. */
+ dev->stats.rx_errors++; /* Missed a Rx frame. */
}
if (csr0 & MERR) {
handled = 1;
@@ -672,7 +670,7 @@ static int ariadne_start_xmit(struct sk_
priv->cur_tx -= TX_RING_SIZE;
priv->dirty_tx -= TX_RING_SIZE;
}
- priv->stats.tx_bytes += len;
+ dev->stats.tx_bytes += len;
/* Trigger an immediate send poll. */
lance->RAP = CSR0; /* PCnet-ISA Controller Status */
@@ -707,15 +705,15 @@ static int ariadne_rx(struct net_device
buffers, with only the last correctly noting the error. */
if (status & RF_ENP)
/* Only count a general error at the end of a packet.*/
- priv->stats.rx_errors++;
+ dev->stats.rx_errors++;
if (status & RF_FRAM)
- priv->stats.rx_frame_errors++;
+ dev->stats.rx_frame_errors++;
if (status & RF_OFLO)
- priv->stats.rx_over_errors++;
+ dev->stats.rx_over_errors++;
if (status & RF_CRC)
- priv->stats.rx_crc_errors++;
+ dev->stats.rx_crc_errors++;
if (status & RF_BUFF)
- priv->stats.rx_fifo_errors++;
+ dev->stats.rx_fifo_errors++;
priv->rx_ring[entry]->RMD1 &= 0xff00|RF_STP|RF_ENP;
} else {
/* Malloc up new buffer, compatible with net-3. */
@@ -731,7 +729,7 @@ static int ariadne_rx(struct net_device
break;
if (i > RX_RING_SIZE-2) {
- priv->stats.rx_dropped++;
+ dev->stats.rx_dropped++;
priv->rx_ring[entry]->RMD1 |= RF_OWN;
priv->cur_rx++;
}
@@ -764,8 +762,8 @@ static int ariadne_rx(struct net_device
netif_rx(skb);
dev->last_rx = jiffies;
- priv->stats.rx_packets++;
- priv->stats.rx_bytes += pkt_len;
+ dev->stats.rx_packets++;
+ dev->stats.rx_bytes += pkt_len;
}
priv->rx_ring[entry]->RMD1 |= RF_OWN;
@@ -783,7 +781,6 @@ static int ariadne_rx(struct net_device
static struct net_device_stats *ariadne_get_stats(struct net_device *dev)
{
- struct ariadne_private *priv = netdev_priv(dev);
volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr;
short saved_addr;
unsigned long flags;
@@ -791,11 +788,11 @@ static struct net_device_stats *ariadne_
local_irq_save(flags);
saved_addr = lance->RAP;
lance->RAP = CSR112; /* Missed Frame Count */
- priv->stats.rx_missed_errors = swapw(lance->RDP);
+ dev->stats.rx_missed_errors = swapw(lance->RDP);
lance->RAP = saved_addr;
local_irq_restore(flags);
- return &priv->stats;
+ return &dev->stats;
}
--
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] 38+ messages in thread
* [patch 03/29] m68k: Return -ENODEV if no device is found
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
2008-07-17 19:16 ` [patch 01/29] m68k: remove CVS keywords Geert Uytterhoeven
2008-07-17 19:16 ` [patch 02/29] ariadne: use netstats in net_device structure Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 04/29] m68k: vmlinux-std/sun3.lds.S cleanup - use PAGE_SIZE macro Geert Uytterhoeven
` (25 subsequent siblings)
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel
[-- Attachment #1: m68k-initcalls-should-return-ENODEV-if-device-not-found2.diff --]
[-- Type: text/plain, Size: 1999 bytes --]
From: Geert Uytterhoeven <geert@linux-m68k.org>
According to the tests in do_initcalls(), the proper error code in case no
device is found is -ENODEV, not -ENXIO or -EIO.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/block/ataflop.c | 4 ++--
drivers/char/nvram.c | 2 +-
drivers/input/keyboard/atakbd.c | 2 +-
drivers/video/atafb.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
--- a/drivers/block/ataflop.c
+++ b/drivers/block/ataflop.c
@@ -1880,11 +1880,11 @@ static int __init atari_floppy_init (voi
if (!MACH_IS_ATARI)
/* Amiga, Mac, ... don't have Atari-compatible floppy :-) */
- return -ENXIO;
+ return -ENODEV;
if (MACH_IS_HADES)
/* Hades doesn't have Atari-compatible floppy */
- return -ENXIO;
+ return -ENODEV;
if (register_blkdev(FLOPPY_MAJOR,"fd"))
return -EBUSY;
--- a/drivers/char/nvram.c
+++ b/drivers/char/nvram.c
@@ -444,7 +444,7 @@ nvram_init(void)
/* First test whether the driver should init at all */
if (!CHECK_DRIVER_INIT())
- return -ENXIO;
+ return -ENODEV;
ret = misc_register(&nvram_dev);
if (ret) {
--- a/drivers/input/keyboard/atakbd.c
+++ b/drivers/input/keyboard/atakbd.c
@@ -220,7 +220,7 @@ static int __init atakbd_init(void)
int i, error;
if (!MACH_IS_ATARI || !ATARIHW_PRESENT(ST_MFP))
- return -EIO;
+ return -ENODEV;
// need to init core driver if not already done so
if (atari_keyb_init())
--- a/drivers/video/atafb.c
+++ b/drivers/video/atafb.c
@@ -3110,7 +3110,7 @@ int __init atafb_init(void)
printk("atafb_init: start\n");
if (!MACH_IS_ATARI)
- return -ENXIO;
+ return -ENODEV;
do {
#ifdef ATAFB_EXT
--
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] 38+ messages in thread
* [patch 04/29] m68k: vmlinux-std/sun3.lds.S cleanup - use PAGE_SIZE macro
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (2 preceding siblings ...)
2008-07-17 19:16 ` [patch 03/29] m68k: Return -ENODEV if no device is found Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 05/29] m68k: Allow no CPU/platform type for allnoconfig Geert Uytterhoeven
` (24 subsequent siblings)
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel, Cyrill Gorcunov
[-- Attachment #1: m68k-vmlinux-std_sun3.lds.S_cleanup_use_PAGE_SIZE_macro.diff --]
[-- Type: text/plain, Size: 2106 bytes --]
From: Cyrill Gorcunov <gorcunov@gmail.com>
This patch includes page.h header into linker script that
allow us to use PAGE_SIZE macro instead of numeric constant
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
arch/m68k/kernel/vmlinux-std.lds | 3 ++-
arch/m68k/kernel/vmlinux-sun3.lds | 7 ++++---
2 files changed, 6 insertions(+), 4 deletions(-)
--- a/arch/m68k/kernel/vmlinux-std.lds
+++ b/arch/m68k/kernel/vmlinux-std.lds
@@ -1,6 +1,7 @@
/* ld script to make m68k Linux kernel */
#include <asm-generic/vmlinux.lds.h>
+#include <asm/page.h>
OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k")
OUTPUT_ARCH(m68k)
@@ -41,7 +42,7 @@ SECTIONS
_edata = .; /* End of data section */
/* will be freed after init */
- . = ALIGN(4096); /* Init code and data */
+ . = ALIGN(PAGE_SIZE); /* Init code and data */
__init_begin = .;
.init.text : {
_sinittext = .;
--- a/arch/m68k/kernel/vmlinux-sun3.lds
+++ b/arch/m68k/kernel/vmlinux-sun3.lds
@@ -1,6 +1,7 @@
/* ld script to make m68k Linux kernel */
#include <asm-generic/vmlinux.lds.h>
+#include <asm/page.h>
OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k")
OUTPUT_ARCH(m68k)
@@ -34,7 +35,7 @@ SECTIONS
_edata = .;
/* will be freed after init */
- . = ALIGN(8192); /* Init code and data */
+ . = ALIGN(PAGE_SIZE); /* Init code and data */
__init_begin = .;
.init.text : {
_sinittext = .;
@@ -61,12 +62,12 @@ __init_begin = .;
}
SECURITY_INIT
#ifdef CONFIG_BLK_DEV_INITRD
- . = ALIGN(8192);
+ . = ALIGN(PAGE_SIZE);
__initramfs_start = .;
.init.ramfs : { *(.init.ramfs) }
__initramfs_end = .;
#endif
- . = ALIGN(8192);
+ . = ALIGN(PAGE_SIZE);
__init_end = .;
.data.init.task : { *(.data.init_task) }
--
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] 38+ messages in thread
* [patch 05/29] m68k: Allow no CPU/platform type for allnoconfig
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (3 preceding siblings ...)
2008-07-17 19:16 ` [patch 04/29] m68k: vmlinux-std/sun3.lds.S cleanup - use PAGE_SIZE macro Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 06/29] m68k: remove -traditional Geert Uytterhoeven
` (23 subsequent siblings)
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel
[-- Attachment #1: m68k-allnoconfig.diff --]
[-- Type: text/plain, Size: 3426 bytes --]
From: Geert Uytterhoeven <geert@linux-m68k.org>
Allow no CPU/platform type for allnoconfig
- Provide a dummy value for FPSTATESIZE if no CPU type was selected
- Provide a dummy value for NR_IRQS if no platform type was selected
- Warn the user if no CPU or platform type was selected
Note: you still cannot build an allnoconfig kernel, as CONFIG_SWAP=n doesn't
build and we cannot easily fix that
(http://groups.google.com/group/linux.kernel/browse_thread/thread/d430c78b07e1827b)
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
arch/m68k/kernel/setup.c | 6 ++++++
include/asm-m68k/fpu.h | 10 +++++-----
include/asm-m68k/irq.h | 2 +-
include/asm-m68k/tlbflush.h | 8 ++++----
4 files changed, 16 insertions(+), 10 deletions(-)
--- a/arch/m68k/kernel/setup.c
+++ b/arch/m68k/kernel/setup.c
@@ -26,6 +26,7 @@
#include <asm/bootinfo.h>
#include <asm/setup.h>
+#include <asm/fpu.h>
#include <asm/irq.h>
#include <asm/io.h>
#include <asm/machdep.h>
@@ -40,6 +41,11 @@
#include <asm/dvma.h>
#endif
+#if !FPSTATESIZE || !NR_IRQS
+#warning No CPU/platform type selected, your kernel will not work!
+#warning Are you building an allnoconfig kernel?
+#endif
+
unsigned long m68k_machtype;
EXPORT_SYMBOL(m68k_machtype);
unsigned long m68k_cputype;
--- a/include/asm-m68k/fpu.h
+++ b/include/asm-m68k/fpu.h
@@ -7,15 +7,15 @@
*/
#if defined(CONFIG_M68020) || defined(CONFIG_M68030)
-#define FPSTATESIZE (216/sizeof(unsigned char))
+#define FPSTATESIZE (216)
#elif defined(CONFIG_M68040)
-#define FPSTATESIZE (96/sizeof(unsigned char))
+#define FPSTATESIZE (96)
#elif defined(CONFIG_M68KFPU_EMU)
-#define FPSTATESIZE (28/sizeof(unsigned char))
+#define FPSTATESIZE (28)
#elif defined(CONFIG_M68060)
-#define FPSTATESIZE (12/sizeof(unsigned char))
+#define FPSTATESIZE (12)
#else
-#define FPSTATESIZE error no_cpu_type_configured
+#define FPSTATESIZE (0)
#endif
#endif /* __M68K_FPU_H */
--- a/include/asm-m68k/irq.h
+++ b/include/asm-m68k/irq.h
@@ -24,7 +24,7 @@
#elif defined(CONFIG_HP300)
#define NR_IRQS 8
#else
-#error unknown nr of irqs
+#define NR_IRQS 0
#endif
/*
--- a/include/asm-m68k/tlbflush.h
+++ b/include/asm-m68k/tlbflush.h
@@ -16,7 +16,7 @@ static inline void flush_tlb_kernel_page
".chip 68k"
: : "a" (addr));
set_fs(old_fs);
- } else
+ } else if (CPU_IS_020_OR_030)
__asm__ __volatile__("pflush #4,#4,(%0)" : : "a" (addr));
}
@@ -29,7 +29,7 @@ static inline void __flush_tlb(void)
__asm__ __volatile__(".chip 68040\n\t"
"pflushan\n\t"
".chip 68k");
- else
+ else if (CPU_IS_020_OR_030)
__asm__ __volatile__("pflush #0,#4");
}
@@ -45,7 +45,7 @@ static inline void __flush_tlb_one(unsig
{
if (CPU_IS_040_OR_060)
__flush_tlb040_one(addr);
- else
+ else if (CPU_IS_020_OR_030)
__asm__ __volatile__("pflush #0,#4,(%0)" : : "a" (addr));
}
@@ -60,7 +60,7 @@ static inline void flush_tlb_all(void)
__asm__ __volatile__(".chip 68040\n\t"
"pflusha\n\t"
".chip 68k");
- else
+ else if (CPU_IS_020_OR_030)
__asm__ __volatile__("pflusha");
}
--
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] 38+ messages in thread
* [patch 06/29] m68k: remove -traditional
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (4 preceding siblings ...)
2008-07-17 19:16 ` [patch 05/29] m68k: Allow no CPU/platform type for allnoconfig Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 07/29] m68k: make multi_defconfig the default defconfig Geert Uytterhoeven
` (22 subsequent siblings)
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: linux-m68k, linux-kernel, Sam Ravnborg, Mathieu Desnoyers
[-- Attachment #1: m68k-remove-traditional.diff --]
[-- Type: text/plain, Size: 2198 bytes --]
From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Subject: [patch 06/29] [RFC patch 4/9] Re: [PATCH] Stringify support commas
> This is a no-no for those archs that still use -traditional.
> > I dunno if this is a problem for you at the moment and the
> > right fix is anyway to nuke -traditional.
> >
> > Sam
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
arch/m68k/fpsp040/Makefile | 1 -
arch/m68k/ifpsp060/Makefile | 1 -
arch/m68k/kernel/Makefile | 2 --
arch/m68k/lib/Makefile | 2 --
arch/m68k/math-emu/Makefile | 2 --
5 files changed, 8 deletions(-)
--- a/arch/m68k/fpsp040/Makefile
+++ b/arch/m68k/fpsp040/Makefile
@@ -10,7 +10,6 @@ obj-y := bindec.o binstr.o decbin.o d
x_bsun.o x_fline.o x_operr.o x_ovfl.o x_snan.o x_store.o \
x_unfl.o x_unimp.o x_unsupp.o bugfix.o skeleton.o
-EXTRA_AFLAGS := -traditional
EXTRA_LDFLAGS := -x
$(OS_OBJS): fpsp.h
--- a/arch/m68k/ifpsp060/Makefile
+++ b/arch/m68k/ifpsp060/Makefile
@@ -6,5 +6,4 @@
obj-y := fskeleton.o iskeleton.o os.o
-EXTRA_AFLAGS := -traditional
EXTRA_LDFLAGS := -x
--- a/arch/m68k/kernel/Makefile
+++ b/arch/m68k/kernel/Makefile
@@ -16,5 +16,3 @@ devres-y = ../../../kernel/irq/devres.o
obj-$(CONFIG_PCI) += bios32.o
obj-y$(CONFIG_MMU_SUN3) += dma.o # no, it's not a typo
-
-EXTRA_AFLAGS := -traditional
--- a/arch/m68k/lib/Makefile
+++ b/arch/m68k/lib/Makefile
@@ -2,7 +2,5 @@
# Makefile for m68k-specific library files..
#
-EXTRA_AFLAGS := -traditional
-
lib-y := ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \
checksum.o string.o uaccess.o
--- a/arch/m68k/math-emu/Makefile
+++ b/arch/m68k/math-emu/Makefile
@@ -2,8 +2,6 @@
# Makefile for the linux kernel.
#
-EXTRA_AFLAGS := -traditional
-
#EXTRA_AFLAGS += -DFPU_EMU_DEBUG
#EXTRA_CFLAGS += -DFPU_EMU_DEBUG
--
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] 38+ messages in thread
* [patch 07/29] m68k: make multi_defconfig the default defconfig
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (5 preceding siblings ...)
2008-07-17 19:16 ` [patch 06/29] m68k: remove -traditional Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 08/29] m68k: remove AP1000 code Geert Uytterhoeven
` (21 subsequent siblings)
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel, Adrian Bunk
[-- Attachment #1: m68k-make-multi_defconfig-the-default-defconfig.diff --]
[-- Type: text/plain, Size: 858 bytes --]
From: Adrian Bunk <bunk@kernel.org>
It seems to match the intention behind multi_defconfig to make it the
default defconfig.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
arch/m68k/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/m68k/Makefile
+++ b/arch/m68k/Makefile
@@ -13,7 +13,7 @@
# Copyright (C) 1994 by Hamish Macdonald
#
-KBUILD_DEFCONFIG := amiga_defconfig
+KBUILD_DEFCONFIG := multi_defconfig
# override top level makefile
AS += -m68020
--
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] 38+ messages in thread
* [patch 08/29] m68k: remove AP1000 code
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (6 preceding siblings ...)
2008-07-17 19:16 ` [patch 07/29] m68k: make multi_defconfig the default defconfig Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 09/29] ZORRO: Replace deprecated __initcall with equivalent device_initcall Geert Uytterhoeven
` (20 subsequent siblings)
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel, Adrian Bunk
[-- Attachment #1: m68k-remove-AP1000-code.diff --]
[-- Type: text/plain, Size: 2671 bytes --]
From: Adrian Bunk <bunk@kernel.org>
Unless I miss something that's code for a sparc machine even the sparc
code no longer supports that got copied to m68k when these files were
copied.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
arch/m68k/sun3/prom/console.c | 4 ----
arch/m68k/sun3/prom/init.c | 9 ---------
arch/m68k/sun3/prom/printf.c | 5 -----
include/asm-m68k/oplib.h | 1 -
4 files changed, 19 deletions(-)
--- a/arch/m68k/sun3/prom/console.c
+++ b/arch/m68k/sun3/prom/console.c
@@ -104,8 +104,6 @@ prom_query_input_device()
return PROMDEV_ITTYB;
}
return PROMDEV_I_UNK;
- case PROM_AP1000:
- return PROMDEV_I_UNK;
};
}
#endif
@@ -166,8 +164,6 @@ prom_query_output_device()
};
}
break;
- case PROM_AP1000:
- return PROMDEV_I_UNK;
};
return PROMDEV_O_UNK;
}
--- a/arch/m68k/sun3/prom/init.c
+++ b/arch/m68k/sun3/prom/init.c
@@ -31,11 +31,6 @@ extern void prom_ranges_init(void);
void __init prom_init(struct linux_romvec *rp)
{
-#ifdef CONFIG_AP1000
- extern struct linux_romvec *ap_prom_init(void);
- rp = ap_prom_init();
-#endif
-
romvec = rp;
#ifndef CONFIG_SUN3
switch(romvec->pv_romvers) {
@@ -53,10 +48,6 @@ void __init prom_init(struct linux_romve
prom_printf("PROMLIB: Sun IEEE Prom not supported yet\n");
prom_halt();
break;
- case 42: /* why not :-) */
- prom_vers = PROM_AP1000;
- break;
-
default:
prom_printf("PROMLIB: Bad PROM version %d\n",
romvec->pv_romvers);
--- a/arch/m68k/sun3/prom/printf.c
+++ b/arch/m68k/sun3/prom/printf.c
@@ -37,10 +37,6 @@ prom_printf(char *fmt, ...)
bptr = ppbuf;
-#ifdef CONFIG_AP1000
- ap_write(1,bptr,strlen(bptr));
-#else
-
#ifdef CONFIG_KGDB
if (kgdb_initialized) {
printk("kgdb_initialized = %d\n", kgdb_initialized);
@@ -54,7 +50,6 @@ prom_printf(char *fmt, ...)
prom_putchar(ch);
}
#endif
-#endif
va_end(args);
return;
}
--- a/include/asm-m68k/oplib.h
+++ b/include/asm-m68k/oplib.h
@@ -19,7 +19,6 @@ enum prom_major_version {
PROM_V2, /* sun4c and early sun4m V2 prom */
PROM_V3, /* sun4m and later, up to sun4d/sun4e machines V3 */
PROM_P1275, /* IEEE compliant ISA based Sun PROM, only sun4u */
- PROM_AP1000, /* actually no prom at all */
};
extern enum prom_major_version prom_vers;
--
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] 38+ messages in thread
* [patch 09/29] ZORRO: Replace deprecated __initcall with equivalent device_initcall.
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (7 preceding siblings ...)
2008-07-17 19:16 ` [patch 08/29] m68k: remove AP1000 code Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 10/29] zorro: use memory_read_from_buffer Geert Uytterhoeven
` (19 subsequent siblings)
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel, Robert P. J. Day
[-- Attachment #1: zorro-replace-deprecated-__initcall-with-equivalent-device_initcall.diff --]
[-- Type: text/plain, Size: 821 bytes --]
From: Robert P. J. Day <rpjday@crashcourse.ca>
ZORRO: Replace deprecated __initcall with equivalent device_initcall.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/zorro/proc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/zorro/proc.c
+++ b/drivers/zorro/proc.c
@@ -158,4 +158,4 @@ static int __init zorro_proc_init(void)
return 0;
}
-__initcall(zorro_proc_init);
+device_initcall(zorro_proc_init);
--
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] 38+ messages in thread
* [patch 10/29] zorro: use memory_read_from_buffer
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (8 preceding siblings ...)
2008-07-17 19:16 ` [patch 09/29] ZORRO: Replace deprecated __initcall with equivalent device_initcall Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 11/29] amifb: Register Amiga-specific video modes with sysfs Geert Uytterhoeven
` (18 subsequent siblings)
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel, Akinobu Mita
[-- Attachment #1: zorro-use-memory_read_from_buffer.diff --]
[-- Type: text/plain, Size: 1479 bytes --]
From: akinobu.mita@gmail.com
zorro: use memory_read_from_buffer
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/zorro/zorro-sysfs.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
--- a/drivers/zorro/zorro-sysfs.c
+++ b/drivers/zorro/zorro-sysfs.c
@@ -15,6 +15,7 @@
#include <linux/zorro.h>
#include <linux/stat.h>
#include <linux/string.h>
+#include <linux/fs.h>
#include "zorro.h"
@@ -56,12 +57,6 @@ static ssize_t zorro_read_config(struct
struct zorro_dev *z = to_zorro_dev(container_of(kobj, struct device,
kobj));
struct ConfigDev cd;
- unsigned int size = sizeof(cd);
-
- if (off > size)
- return 0;
- if (off+count > size)
- count = size-off;
/* Construct a ConfigDev */
memset(&cd, 0, sizeof(cd));
@@ -71,8 +66,7 @@ static ssize_t zorro_read_config(struct
cd.cd_BoardAddr = (void *)zorro_resource_start(z);
cd.cd_BoardSize = zorro_resource_len(z);
- memcpy(buf, (void *)&cd+off, count);
- return count;
+ return memory_read_from_buffer(buf, count, &off, &cd, sizeof(cd));
}
static struct bin_attribute zorro_config_attr = {
--
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] 38+ messages in thread
* [patch 11/29] amifb: Register Amiga-specific video modes with sysfs
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (9 preceding siblings ...)
2008-07-17 19:16 ` [patch 10/29] zorro: use memory_read_from_buffer Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 12/29] atafb: Register Atari-specific " Geert Uytterhoeven
` (17 subsequent siblings)
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel
[-- Attachment #1: amifb-add-ami_modedb-to-modelist.diff --]
[-- Type: text/plain, Size: 923 bytes --]
Register the Amiga-specific video modes with sysfs, so you can see them in
/sys/class/graphics/fb0/modes and change the video mode by writing to
/sys/class/graphics/fb0/mode.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/video/amifb.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/video/amifb.c
+++ b/drivers/video/amifb.c
@@ -2383,6 +2383,9 @@ default_chipset:
goto amifb_error;
}
+ fb_videomode_to_modelist(ami_modedb, NUM_TOTAL_MODES,
+ &fb_info.modelist);
+
round_down_bpp = 0;
chipptr = chipalloc(fb_info.fix.smem_len+
SPRITEMEMSIZE+
--
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] 38+ messages in thread
* [patch 12/29] atafb: Register Atari-specific video modes with sysfs
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (10 preceding siblings ...)
2008-07-17 19:16 ` [patch 11/29] amifb: Register Amiga-specific video modes with sysfs Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 13/29] drivers/video/c2p.c: add MODULE_LICENSE Geert Uytterhoeven
` (16 subsequent siblings)
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel
[-- Attachment #1: atafb-add-atafb_modedb-to-modelist.diff --]
[-- Type: text/plain, Size: 931 bytes --]
Register the Atari-specific video modes with sysfs, so you can see them in
/sys/class/graphics/fb0/modes and change the video mode by writing to
/sys/class/graphics/fb0/mode.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/video/atafb.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/video/atafb.c
+++ b/drivers/video/atafb.c
@@ -3230,6 +3230,9 @@ int __init atafb_init(void)
return -EINVAL;
}
+ fb_videomode_to_modelist(atafb_modedb, NUM_TOTAL_MODES,
+ &fb_info.modelist);
+
atafb_set_disp(&fb_info);
fb_alloc_cmap(&(fb_info.cmap), 1 << fb_info.var.bits_per_pixel, 0);
--
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] 38+ messages in thread
* [patch 13/29] drivers/video/c2p.c: add MODULE_LICENSE
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (11 preceding siblings ...)
2008-07-17 19:16 ` [patch 12/29] atafb: Register Atari-specific " Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 14/29] export amiga_vblank Geert Uytterhoeven
` (15 subsequent siblings)
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel, Adrian Bunk
[-- Attachment #1: drivers-video-c2p.c-add-MODULE_LICENSE.diff --]
[-- Type: text/plain, Size: 883 bytes --]
From: Adrian Bunk <bunk@kernel.org>
This patch adds the missing MODULE_LICENSE("GPL").
Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/video/c2p.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/video/c2p.c
+++ b/drivers/video/c2p.c
@@ -12,6 +12,7 @@
* for more details.
*/
+#include <linux/module.h>
#include <linux/string.h>
#include "c2p.h"
@@ -227,3 +228,4 @@ void c2p(u8 *dst, const u8 *src, u32 dx,
}
}
+MODULE_LICENSE("GPL");
--
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] 38+ messages in thread
* [patch 14/29] export amiga_vblank
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (12 preceding siblings ...)
2008-07-17 19:16 ` [patch 13/29] drivers/video/c2p.c: add MODULE_LICENSE Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 15/29] export c2p Geert Uytterhoeven
` (14 subsequent siblings)
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel, Adrian Bunk
[-- Attachment #1: m68k-export-amiga_vblank.diff --]
[-- Type: text/plain, Size: 1069 bytes --]
From: Adrian Bunk <bunk@kernel.org>
This patch fixes the following build error:
<-- snip -->
..
Building modules, stage 2.
MODPOST 1203 modules
ERROR: "amiga_vblank" [drivers/video/amifb.ko] undefined!
..
make[2]: *** [__modpost] Error 1
<-- snip -->
Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
arch/m68k/amiga/config.c | 2 ++
1 file changed, 2 insertions(+)
--- a/arch/m68k/amiga/config.c
+++ b/arch/m68k/amiga/config.c
@@ -51,6 +51,8 @@ unsigned long amiga_chipset;
EXPORT_SYMBOL(amiga_chipset);
unsigned char amiga_vblank;
+EXPORT_SYMBOL(amiga_vblank);
+
unsigned char amiga_psfreq;
struct amiga_hw_present amiga_hw_present;
--
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] 38+ messages in thread
* [patch 15/29] export c2p
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (13 preceding siblings ...)
2008-07-17 19:16 ` [patch 14/29] export amiga_vblank Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 16/29] m68k/amiga/: possible cleanups Geert Uytterhoeven
` (13 subsequent siblings)
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel, Adrian Bunk
[-- Attachment #1: m68k-export-c2p.diff --]
[-- Type: text/plain, Size: 973 bytes --]
From: Adrian Bunk <bunk@kernel.org>
This patch fixes the following build error:
<-- snip -->
..
Building modules, stage 2.
MODPOST 1203 modules
ERROR: "c2p" [drivers/video/amifb.ko] undefined!
..
make[2]: *** [__modpost] Error 1
<-- snip -->
Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/video/c2p.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/video/c2p.c
+++ b/drivers/video/c2p.c
@@ -227,5 +227,6 @@ void c2p(u8 *dst, const u8 *src, u32 dx,
dst += dst_nextline;
}
}
+EXPORT_SYMBOL_GPL(c2p);
MODULE_LICENSE("GPL");
--
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] 38+ messages in thread
* [patch 16/29] m68k/amiga/: possible cleanups
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (14 preceding siblings ...)
2008-07-17 19:16 ` [patch 15/29] export c2p Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 17/29] m68k/atari/debug.c: " Geert Uytterhoeven
` (12 subsequent siblings)
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel, Adrian Bunk
[-- Attachment #1: m68k-amiga-possible-cleanups.diff --]
[-- Type: text/plain, Size: 4469 bytes --]
From: Adrian Bunk <bunk@kernel.org>
This patch contains the following possible cleanups:
- amiints.c: add a proper prototype for amiga_init_IRQ() in
include/asm-m68k/amigaints.h
- make the following needlessly global code static:
- config.c: amiga_model
- config.c: amiga_psfreq
- config.c: amiga_serial_console_write()
- #if 0 the following unused functions:
- config.c: amiga_serial_puts()
- config.c: amiga_serial_console_wait_key()
- config.c: amiga_serial_gets()
- remove the following unused variable:
- config.c: amiga_masterclock
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
arch/m68k/amiga/config.c | 20 ++++++--------------
include/asm-m68k/amigahw.h | 4 ----
include/asm-m68k/amigaints.h | 2 ++
3 files changed, 8 insertions(+), 18 deletions(-)
--- a/arch/m68k/amiga/config.c
+++ b/arch/m68k/amiga/config.c
@@ -36,14 +36,11 @@
#include <asm/machdep.h>
#include <asm/io.h>
-unsigned long amiga_model;
-EXPORT_SYMBOL(amiga_model);
+static unsigned long amiga_model;
unsigned long amiga_eclock;
EXPORT_SYMBOL(amiga_eclock);
-unsigned long amiga_masterclock;
-
unsigned long amiga_colorclock;
EXPORT_SYMBOL(amiga_colorclock);
@@ -53,7 +50,7 @@ EXPORT_SYMBOL(amiga_chipset);
unsigned char amiga_vblank;
EXPORT_SYMBOL(amiga_vblank);
-unsigned char amiga_psfreq;
+static unsigned char amiga_psfreq;
struct amiga_hw_present amiga_hw_present;
EXPORT_SYMBOL(amiga_hw_present);
@@ -94,8 +91,6 @@ static char *amiga_models[] __initdata =
static char amiga_model_name[13] = "Amiga ";
static void amiga_sched_init(irq_handler_t handler);
-/* amiga specific irq functions */
-extern void amiga_init_IRQ(void);
static void amiga_get_model(char *model);
static int amiga_get_hardware_list(char *buffer);
/* amiga specific timer functions */
@@ -109,8 +104,6 @@ static void amiga_reset(void);
extern void amiga_init_sound(void);
static void amiga_mem_console_write(struct console *co, const char *b,
unsigned int count);
-void amiga_serial_console_write(struct console *co, const char *s,
- unsigned int count);
#ifdef CONFIG_HEARTBEAT
static void amiga_heartbeat(int on);
#endif
@@ -420,8 +413,7 @@ void __init config_amiga(void)
mach_heartbeat = amiga_heartbeat;
#endif
- /* Fill in the clock values (based on the 700 kHz E-Clock) */
- amiga_masterclock = 40*amiga_eclock; /* 28 MHz */
+ /* Fill in the clock value (based on the 700 kHz E-Clock) */
amiga_colorclock = 5*amiga_eclock; /* 3.5 MHz */
/* clear all DMA bits */
@@ -819,8 +811,8 @@ static void amiga_serial_putc(char c)
;
}
-void amiga_serial_console_write(struct console *co, const char *s,
- unsigned int count)
+static void amiga_serial_console_write(struct console *co, const char *s,
+ unsigned int count)
{
while (count--) {
if (*s == '\n')
@@ -829,7 +821,7 @@ void amiga_serial_console_write(struct c
}
}
-#ifdef CONFIG_SERIAL_CONSOLE
+#if 0
void amiga_serial_puts(const char *s)
{
amiga_serial_console_write(NULL, s, strlen(s));
--- a/include/asm-m68k/amigahw.h
+++ b/include/asm-m68k/amigahw.h
@@ -22,8 +22,6 @@
* Different Amiga models
*/
-extern unsigned long amiga_model;
-
#define AMI_UNKNOWN (0)
#define AMI_500 (1)
#define AMI_500PLUS (2)
@@ -59,11 +57,9 @@ extern unsigned long amiga_chipset;
*/
extern unsigned long amiga_eclock; /* 700 kHz E Peripheral Clock */
-extern unsigned long amiga_masterclock; /* 28 MHz Master Clock */
extern unsigned long amiga_colorclock; /* 3.5 MHz Color Clock */
extern unsigned long amiga_chip_size; /* Chip RAM Size (bytes) */
extern unsigned char amiga_vblank; /* VBLANK Frequency */
-extern unsigned char amiga_psfreq; /* Power Supply Frequency */
#define AMIGAHW_DECLARE(name) unsigned name : 1
--- a/include/asm-m68k/amigaints.h
+++ b/include/asm-m68k/amigaints.h
@@ -98,6 +98,8 @@
#define CIA_ICR_ALL 0x1f
#define CIA_ICR_SETCLR 0x80
+extern void amiga_init_IRQ(void);
+
/* to access the interrupt control registers of CIA's use only
** these functions, they behave exactly like the amiga os routines
*/
--
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] 38+ messages in thread
* [patch 17/29] m68k/atari/debug.c: possible cleanups
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (15 preceding siblings ...)
2008-07-17 19:16 ` [patch 16/29] m68k/amiga/: possible cleanups Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-20 20:06 ` Michael Schmitz
2008-07-17 19:16 ` [patch 18/29] m68k/mac/: " Geert Uytterhoeven
` (11 subsequent siblings)
28 siblings, 1 reply; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel, Adrian Bunk
[-- Attachment #1: m68k-atari-debug.c-possible-cleanups.diff --]
[-- Type: text/plain, Size: 4127 bytes --]
From: Adrian Bunk <bunk@kernel.org>
This patch contains the following possible cleanups:
- make the following needlessly global functions (always) static:
- atari_mfp_console_write()
- atari_scc_console_write()
- atari_midi_console_write()
- atari_init_mfp_port()
- atari_init_scc_port()
- atari_init_midi_port()
- #if 0 the following unused functions:
- atari_mfp_console_wait_key()
- atari_scc_console_wait_key()
- atari_midi_console_wait_key()
- remove the following unused variables:
- atari_MFP_init_done
- atari_SCC_init_done
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
arch/m68k/atari/debug.c | 37 +++++++------------------------------
1 file changed, 7 insertions(+), 30 deletions(-)
--- a/arch/m68k/atari/debug.c
+++ b/arch/m68k/atari/debug.c
@@ -20,14 +20,6 @@
#include <asm/atarihw.h>
#include <asm/atariints.h>
-/* Flag that Modem1 port is already initialized and used */
-int atari_MFP_init_done;
-EXPORT_SYMBOL(atari_MFP_init_done);
-
-/* Flag that Modem1 port is already initialized and used */
-int atari_SCC_init_done;
-EXPORT_SYMBOL(atari_SCC_init_done);
-
/* Can be set somewhere, if a SCC master reset has already be done and should
* not be repeated; used by kgdb */
int atari_SCC_reset_done;
@@ -47,8 +39,8 @@ static inline void ata_mfp_out(char c)
mfp.usart_dta = c;
}
-void atari_mfp_console_write(struct console *co, const char *str,
- unsigned int count)
+static void atari_mfp_console_write(struct console *co, const char *str,
+ unsigned int count)
{
while (count--) {
if (*str == '\n')
@@ -66,8 +58,8 @@ static inline void ata_scc_out(char c)
scc.cha_b_data = c;
}
-void atari_scc_console_write(struct console *co, const char *str,
- unsigned int count)
+static void atari_scc_console_write(struct console *co, const char *str,
+ unsigned int count)
{
while (count--) {
if (*str == '\n')
@@ -83,8 +75,8 @@ static inline void ata_midi_out(char c)
acia.mid_data = c;
}
-void atari_midi_console_write(struct console *co, const char *str,
- unsigned int count)
+static void atari_midi_console_write(struct console *co, const char *str,
+ unsigned int count)
{
while (count--) {
if (*str == '\n')
@@ -136,7 +128,7 @@ static void atari_par_console_write(stru
}
}
-#ifdef CONFIG_SERIAL_CONSOLE
+#if 0
int atari_mfp_console_wait_key(struct console *co)
{
while (!(mfp.rcv_stat & 0x80)) /* wait for rx buf filled */
@@ -166,11 +158,7 @@ int atari_midi_console_wait_key(struct c
* SCC serial ports. They're used by the debugging interface, kgdb, and the
* serial console code.
*/
-#ifndef CONFIG_SERIAL_CONSOLE
static void __init atari_init_mfp_port(int cflag)
-#else
-void atari_init_mfp_port(int cflag)
-#endif
{
/*
* timer values for 1200...115200 bps; > 38400 select 110, 134, or 150
@@ -193,8 +181,6 @@ void atari_init_mfp_port(int cflag)
mfp.tim_dt_d = baud_table[baud];
mfp.tim_ct_cd |= 0x01; /* start timer D, 1:4 */
mfp.trn_stat |= 0x01; /* enable TX */
-
- atari_MFP_init_done = 1;
}
#define SCC_WRITE(reg, val) \
@@ -214,11 +200,7 @@ void atari_init_mfp_port(int cflag)
MFPDELAY(); \
} while (0)
-#ifndef CONFIG_SERIAL_CONSOLE
static void __init atari_init_scc_port(int cflag)
-#else
-void atari_init_scc_port(int cflag)
-#endif
{
extern int atari_SCC_reset_done;
static int clksrc_table[9] =
@@ -277,14 +259,9 @@ void atari_init_scc_port(int cflag)
SCC_WRITE(5, reg5 | 8);
atari_SCC_reset_done = 1;
- atari_SCC_init_done = 1;
}
-#ifndef CONFIG_SERIAL_CONSOLE
static void __init atari_init_midi_port(int cflag)
-#else
-void atari_init_midi_port(int cflag)
-#endif
{
int baud = cflag & CBAUD;
int csize = ((cflag & CSIZE) == CS8) ? 0x10 : 0x00;
--
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] 38+ messages in thread
* [patch 18/29] m68k/mac/: possible cleanups
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (16 preceding siblings ...)
2008-07-17 19:16 ` [patch 17/29] m68k/atari/debug.c: " Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 19/29] m68k/q40/config.c: make functions static Geert Uytterhoeven
` (10 subsequent siblings)
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel, Adrian Bunk
[-- Attachment #1: m68k-mac-possible-cleanups.diff --]
[-- Type: text/plain, Size: 12968 bytes --]
From: Adrian Bunk <bunk@kernel.org>
This patch contains the following possible cleanups:
- make the following needlessly global code (always) static:
- baboon.c: struct baboon
- baboon.c: baboon_irq()
- config.c: mac_orig_videoaddr
- config.c: mac_identify()
- config.c: mac_report_hardware()
- config.c: mac_debug_console_write()
- config.c: mac_sccb_console_write()
- config.c: mac_scca_console_write()
- config.c: mac_init_scc_port()
- oss.c: oss_irq()
- oss.c: oss_nubus_irq()
- psc.c: psc_debug_dump()
- psc.c: psc_dma_die_die_die()
- via.c: rbv_clear
- remove the unused bootparse.c
- #if 0 the following unused functions:
- config.c: mac_debugging_short()
- config.c: mac_debugging_long()
- remove the following unused code:
- config.c: mac_bisize
- config.c: mac_env
- config.c: mac_SCC_init_done
- config.c: mac_SCC_reset_done
- config.c: mac_init_scca_port()
- config.c: mac_init_sccb_port()
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
arch/m68k/mac/Makefile | 2
arch/m68k/mac/baboon.c | 26 ++++----
arch/m68k/mac/bootparse.c | 122 ------------------------------------------
arch/m68k/mac/config.c | 11 +--
arch/m68k/mac/debug.c | 41 +++-----------
arch/m68k/mac/oss.c | 8 +-
arch/m68k/mac/psc.c | 4 -
arch/m68k/mac/via.c | 2
include/asm-m68k/mac_baboon.h | 2
include/asm-m68k/mac_via.h | 1
include/asm-m68k/macintosh.h | 5 -
11 files changed, 35 insertions(+), 189 deletions(-)
--- a/arch/m68k/mac/Makefile
+++ b/arch/m68k/mac/Makefile
@@ -2,5 +2,5 @@
# Makefile for Linux arch/m68k/mac source directory
#
-obj-y := config.o bootparse.o macints.o iop.o via.o oss.o psc.o \
+obj-y := config.o macints.o iop.o via.o oss.o psc.o \
baboon.o macboing.o debug.o misc.o
--- a/arch/m68k/mac/baboon.c
+++ b/arch/m68k/mac/baboon.c
@@ -23,9 +23,7 @@
/* #define DEBUG_IRQS */
int baboon_present;
-volatile struct baboon *baboon;
-
-irqreturn_t baboon_irq(int, void *);
+static volatile struct baboon *baboon;
#if 0
extern int macide_ack_intr(struct ata_channel *);
@@ -50,20 +48,10 @@ void __init baboon_init(void)
}
/*
- * Register the Baboon interrupt dispatcher on nubus slot $C.
- */
-
-void __init baboon_register_interrupts(void)
-{
- request_irq(IRQ_NUBUS_C, baboon_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST,
- "baboon", (void *) baboon);
-}
-
-/*
* Baboon interrupt handler. This works a lot like a VIA.
*/
-irqreturn_t baboon_irq(int irq, void *dev_id)
+static irqreturn_t baboon_irq(int irq, void *dev_id)
{
int irq_bit, irq_num;
unsigned char events;
@@ -95,6 +83,16 @@ irqreturn_t baboon_irq(int irq, void *de
return IRQ_HANDLED;
}
+/*
+ * Register the Baboon interrupt dispatcher on nubus slot $C.
+ */
+
+void __init baboon_register_interrupts(void)
+{
+ request_irq(IRQ_NUBUS_C, baboon_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST,
+ "baboon", (void *) baboon);
+}
+
void baboon_irq_enable(int irq) {
#ifdef DEBUG_IRQUSE
printk("baboon_irq_enable(%d)\n", irq);
--- a/arch/m68k/mac/bootparse.c
+++ /dev/null
@@ -1,122 +0,0 @@
-#include <linux/string.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <asm/irq.h>
-#include <asm/setup.h>
-#include <asm/bootinfo.h>
-#include <asm/macintosh.h>
-
-/*
- * Booter vars
- */
-
-int boothowto;
-int _boothowto;
-
-/*
- * Called early to parse the environment (passed to us from the booter)
- * into a bootinfo struct. Will die as soon as we have our own booter
- */
-
-#define atol(x) simple_strtoul(x,NULL,0)
-
-void parse_booter(char *env)
-{
- char *name;
- char *value;
-#if 0
- while(0 && *env)
-#else
- while(*env)
-#endif
- {
- name=env;
- value=name;
- while(*value!='='&&*value)
- value++;
- if(*value=='=')
- *value++=0;
- env=value;
- while(*env)
- env++;
- env++;
-#if 0
- if(strcmp(name,"VIDEO_ADDR")==0)
- mac_mch.videoaddr=atol(value);
- if(strcmp(name,"ROW_BYTES")==0)
- mac_mch.videorow=atol(value);
- if(strcmp(name,"SCREEN_DEPTH")==0)
- mac_mch.videodepth=atol(value);
- if(strcmp(name,"DIMENSIONS")==0)
- mac_mch.dimensions=atol(value);
-#endif
- if(strcmp(name,"BOOTTIME")==0)
- mac_bi_data.boottime=atol(value);
- if(strcmp(name,"GMTBIAS")==0)
- mac_bi_data.gmtbias=atol(value);
- if(strcmp(name,"BOOTERVER")==0)
- mac_bi_data.bootver=atol(value);
- if(strcmp(name,"MACOS_VIDEO")==0)
- mac_bi_data.videological=atol(value);
- if(strcmp(name,"MACOS_SCC")==0)
- mac_bi_data.sccbase=atol(value);
- if(strcmp(name,"MACHINEID")==0)
- mac_bi_data.id=atol(value);
- if(strcmp(name,"MEMSIZE")==0)
- mac_bi_data.memsize=atol(value);
- if(strcmp(name,"SERIAL_MODEM_FLAGS")==0)
- mac_bi_data.serialmf=atol(value);
- if(strcmp(name,"SERIAL_MODEM_HSKICLK")==0)
- mac_bi_data.serialhsk=atol(value);
- if(strcmp(name,"SERIAL_MODEM_GPICLK")==0)
- mac_bi_data.serialgpi=atol(value);
- if(strcmp(name,"SERIAL_PRINT_FLAGS")==0)
- mac_bi_data.printmf=atol(value);
- if(strcmp(name,"SERIAL_PRINT_HSKICLK")==0)
- mac_bi_data.printhsk=atol(value);
- if(strcmp(name,"SERIAL_PRINT_GPICLK")==0)
- mac_bi_data.printgpi=atol(value);
- if(strcmp(name,"PROCESSOR")==0)
- mac_bi_data.cpuid=atol(value);
- if(strcmp(name,"ROMBASE")==0)
- mac_bi_data.rombase=atol(value);
- if(strcmp(name,"TIMEDBRA")==0)
- mac_bi_data.timedbra=atol(value);
- if(strcmp(name,"ADBDELAY")==0)
- mac_bi_data.adbdelay=atol(value);
- }
-#if 0 /* XXX: TODO with m68k_mach_* */
- /* Fill in the base stuff */
- boot_info.machtype=MACH_MAC;
- /* Read this from the macinfo we got ! */
-/* boot_info.cputype=CPU_68020|FPUB_68881;*/
-/* boot_info.memory[0].addr=0;*/
-/* boot_info.memory[0].size=((mac_bi_data.id>>7)&31)<<20;*/
- boot_info.num_memory=1; /* On a MacII */
- boot_info.ramdisk_size=0; /* For now */
- *boot_info.command_line=0;
-#endif
- }
-
-
-void print_booter(char *env)
-{
- char *name;
- char *value;
- while(*env)
- {
- name=env;
- value=name;
- while(*value!='='&&*value)
- value++;
- if(*value=='=')
- *value++=0;
- env=value;
- while(*env)
- env++;
- env++;
- printk("%s=%s\n", name,value);
- }
- }
-
-
--- a/arch/m68k/mac/config.c
+++ b/arch/m68k/mac/config.c
@@ -46,7 +46,6 @@
/* Mac bootinfo struct */
struct mac_booter_data mac_bi_data;
-int mac_bisize = sizeof mac_bi_data;
/* New m68k bootinfo stuff and videobase */
@@ -55,10 +54,8 @@ extern struct mem_info m68k_memory[NUM_M
extern struct mem_info m68k_ramdisk;
-void *mac_env; /* Loaded by the boot asm */
-
/* The phys. video addr. - might be bogus on some machines */
-unsigned long mac_orig_videoaddr;
+static unsigned long mac_orig_videoaddr;
/* Mac specific timer functions */
extern unsigned long mac_gettimeoffset(void);
@@ -79,6 +76,8 @@ extern void mac_mksound(unsigned int, un
extern void nubus_sweep_video(void);
static void mac_get_model(char *str);
+static void mac_identify(void);
+static void mac_report_hardware(void);
static void __init mac_sched_init(irq_handler_t vector)
{
@@ -765,7 +764,7 @@ static struct mac_model mac_data_table[]
}
};
-void __init mac_identify(void)
+static void __init mac_identify(void)
{
struct mac_model *m;
@@ -821,7 +820,7 @@ void __init mac_identify(void)
baboon_init();
}
-void __init mac_report_hardware(void)
+static void __init mac_report_hardware(void)
{
printk(KERN_INFO "Apple Macintosh %s\n", macintosh_config->name);
}
--- a/arch/m68k/mac/debug.c
+++ b/arch/m68k/mac/debug.c
@@ -51,6 +51,8 @@ extern void mac_serial_print(const char
static int peng, line;
#endif
+#if 0
+
void mac_debugging_short(int pos, short num)
{
#ifdef DEBUG_SCREEN
@@ -125,6 +127,8 @@ void mac_debugging_long(int pos, long ad
#endif
}
+#endif /* 0 */
+
#ifdef DEBUG_SERIAL
/*
* TODO: serial debug code
@@ -142,12 +146,6 @@ struct mac_SCC {
# define scc (*((volatile struct mac_SCC*)mac_bi_data.sccbase))
-/* Flag that serial port is already initialized and used */
-int mac_SCC_init_done;
-/* Can be set somewhere, if a SCC master reset has already be done and should
- * not be repeated; used by kgdb */
-int mac_SCC_reset_done;
-
static int scc_port = -1;
static struct console mac_console_driver = {
@@ -171,8 +169,8 @@ static struct console mac_console_driver
* this driver if Mac.
*/
-void mac_debug_console_write(struct console *co, const char *str,
- unsigned int count)
+static void mac_debug_console_write(struct console *co, const char *str,
+ unsigned int count)
{
mac_serial_print(str);
}
@@ -209,8 +207,8 @@ static inline void mac_scca_out(char c)
scc.cha_a_data = c;
}
-void mac_sccb_console_write(struct console *co, const char *str,
- unsigned int count)
+static void mac_sccb_console_write(struct console *co, const char *str,
+ unsigned int count)
{
while (count--) {
if (*str == '\n')
@@ -219,8 +217,8 @@ void mac_sccb_console_write(struct conso
}
}
-void mac_scca_console_write(struct console *co, const char *str,
- unsigned int count)
+static void mac_scca_console_write(struct console *co, const char *str,
+ unsigned int count)
{
while (count--) {
if (*str == '\n')
@@ -265,14 +263,8 @@ void mac_scca_console_write(struct conso
barrier(); \
} while(0)
-#ifndef CONFIG_SERIAL_CONSOLE
static void __init mac_init_scc_port(int cflag, int port)
-#else
-void mac_init_scc_port(int cflag, int port)
-#endif
{
- extern int mac_SCC_reset_done;
-
/*
* baud rates: 1200, 1800, 2400, 4800, 9600, 19.2k, 38.4k, 57.6k, 115.2k
*/
@@ -340,22 +332,9 @@ void mac_init_scc_port(int cflag, int po
SCCA_WRITE(3, reg3 | 1);
SCCA_WRITE(5, reg5 | 8);
}
-
- mac_SCC_reset_done = 1;
- mac_SCC_init_done = 1;
}
#endif /* DEBUG_SERIAL */
-void mac_init_scca_port(int cflag)
-{
- mac_init_scc_port(cflag, 0);
-}
-
-void mac_init_sccb_port(int cflag)
-{
- mac_init_scc_port(cflag, 1);
-}
-
static int __init mac_debug_setup(char *arg)
{
if (!MACH_IS_MAC)
--- a/arch/m68k/mac/oss.c
+++ b/arch/m68k/mac/oss.c
@@ -30,8 +30,8 @@
int oss_present;
volatile struct mac_oss *oss;
-irqreturn_t oss_irq(int, void *);
-irqreturn_t oss_nubus_irq(int, void *);
+static irqreturn_t oss_irq(int, void *);
+static irqreturn_t oss_nubus_irq(int, void *);
extern irqreturn_t via1_irq(int, void *);
extern irqreturn_t mac_scc_dispatch(int, void *);
@@ -92,7 +92,7 @@ void __init oss_nubus_init(void)
* and SCSI; everything else is routed to its own autovector IRQ.
*/
-irqreturn_t oss_irq(int irq, void *dev_id)
+static irqreturn_t oss_irq(int irq, void *dev_id)
{
int events;
@@ -126,7 +126,7 @@ irqreturn_t oss_irq(int irq, void *dev_i
* Unlike the VIA/RBV this is on its own autovector interrupt level.
*/
-irqreturn_t oss_nubus_irq(int irq, void *dev_id)
+static irqreturn_t oss_nubus_irq(int irq, void *dev_id)
{
int events, irq_bit, i;
--- a/arch/m68k/mac/psc.c
+++ b/arch/m68k/mac/psc.c
@@ -36,7 +36,7 @@ irqreturn_t psc_irq(int, void *);
* Debugging dump, used in various places to see what's going on.
*/
-void psc_debug_dump(void)
+static void psc_debug_dump(void)
{
int i;
@@ -55,7 +55,7 @@ void psc_debug_dump(void)
* expanded to cover what I think are the other 7 channels.
*/
-void psc_dma_die_die_die(void)
+static void psc_dma_die_die_die(void)
{
int i;
--- a/arch/m68k/mac/via.c
+++ b/arch/m68k/mac/via.c
@@ -45,7 +45,7 @@ volatile long *via_memory_bogon=(long *)
int rbv_present;
int via_alt_mapping;
EXPORT_SYMBOL(via_alt_mapping);
-__u8 rbv_clear;
+static __u8 rbv_clear;
/*
* Globals for accessing the VIA chip registers without having to
--- a/include/asm-m68k/mac_baboon.h
+++ b/include/asm-m68k/mac_baboon.h
@@ -29,6 +29,4 @@ struct baboon {
*/
};
-extern volatile struct baboon *baboon;
-
#endif /* __ASSEMBLY **/
--- a/include/asm-m68k/mac_via.h
+++ b/include/asm-m68k/mac_via.h
@@ -253,7 +253,6 @@
extern volatile __u8 *via1,*via2;
extern int rbv_present,via_alt_mapping;
-extern __u8 rbv_clear;
static inline int rbv_set_video_bpp(int bpp)
{
--- a/include/asm-m68k/macintosh.h
+++ b/include/asm-m68k/macintosh.h
@@ -12,8 +12,6 @@ extern void mac_reset(void);
extern void mac_poweroff(void);
extern void mac_init_IRQ(void);
extern int mac_irq_pending(unsigned int);
-extern void mac_identify(void);
-extern void mac_report_hardware(void);
/*
* Floppy driver magic hook - probably shouldnt be here
@@ -21,9 +19,6 @@ extern void mac_report_hardware(void);
extern void via1_set_head(int);
-extern void parse_booter(char *ptr);
-extern void print_booter(char *ptr);
-
/*
* Macintosh Table
*/
--
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] 38+ messages in thread
* [patch 19/29] m68k/q40/config.c: make functions static
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (17 preceding siblings ...)
2008-07-17 19:16 ` [patch 18/29] m68k/mac/: " Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 20/29] m68k/sun3/: possible cleanups Geert Uytterhoeven
` (9 subsequent siblings)
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel, Adrian Bunk
[-- Attachment #1: m68k-q40-config.c-make-functions-static.diff --]
[-- Type: text/plain, Size: 3019 bytes --]
From: Adrian Bunk <bunk@kernel.org>
This patch makes the following needlessly global functions static:
- q40_reset()
- q40_halt()
- q40_disable_irqs()
- q40_gettimeoffset()
- q40_hwclk()
- q40_get_ss()
- q40_set_clock_mmss()
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
arch/m68k/q40/config.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
--- a/arch/m68k/q40/config.c
+++ b/arch/m68k/q40/config.c
@@ -41,14 +41,12 @@ static void q40_get_model(char *model);
static int q40_get_hardware_list(char *buffer);
extern void q40_sched_init(irq_handler_t handler);
-extern unsigned long q40_gettimeoffset(void);
-extern int q40_hwclk(int, struct rtc_time *);
-extern unsigned int q40_get_ss(void);
-extern int q40_set_clock_mmss(unsigned long);
+static unsigned long q40_gettimeoffset(void);
+static int q40_hwclk(int, struct rtc_time *);
+static unsigned int q40_get_ss(void);
+static int q40_set_clock_mmss(unsigned long);
static int q40_get_rtc_pll(struct rtc_pll_info *pll);
static int q40_set_rtc_pll(struct rtc_pll_info *pll);
-extern void q40_reset(void);
-void q40_halt(void);
extern void q40_waitbut(void);
void q40_set_vectors(void);
@@ -127,7 +125,7 @@ static void q40_heartbeat(int on)
}
#endif
-void q40_reset(void)
+static void q40_reset(void)
{
halted = 1;
printk("\n\n*******************************************\n"
@@ -137,7 +135,8 @@ void q40_reset(void)
while (1)
;
}
-void q40_halt(void)
+
+static void q40_halt(void)
{
halted = 1;
printk("\n\n*******************\n"
@@ -165,7 +164,8 @@ static unsigned int serports[] =
{
0x3f8,0x2f8,0x3e8,0x2e8,0
};
-void q40_disable_irqs(void)
+
+static void q40_disable_irqs(void)
{
unsigned i, j;
@@ -227,7 +227,7 @@ static inline unsigned char bin2bcd(unsi
}
-unsigned long q40_gettimeoffset(void)
+static unsigned long q40_gettimeoffset(void)
{
return 5000 * (ql_ticks != 0);
}
@@ -248,7 +248,7 @@ unsigned long q40_gettimeoffset(void)
* };
*/
-int q40_hwclk(int op, struct rtc_time *t)
+static int q40_hwclk(int op, struct rtc_time *t)
{
if (op) {
/* Write.... */
@@ -285,7 +285,7 @@ int q40_hwclk(int op, struct rtc_time *t
return 0;
}
-unsigned int q40_get_ss(void)
+static unsigned int q40_get_ss(void)
{
return bcd2bin(Q40_RTC_SECS);
}
@@ -295,7 +295,7 @@ unsigned int q40_get_ss(void)
* clock is out by > 30 minutes. Logic lifted from atari code.
*/
-int q40_set_clock_mmss(unsigned long nowtime)
+static int q40_set_clock_mmss(unsigned long nowtime)
{
int retval = 0;
short real_seconds = nowtime % 60, real_minutes = (nowtime / 60) % 60;
--
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] 38+ messages in thread
* [patch 20/29] m68k/sun3/: possible cleanups
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (18 preceding siblings ...)
2008-07-17 19:16 ` [patch 19/29] m68k/q40/config.c: make functions static Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 21/29] m68k: remove stale ARCH_SUN4 #define Geert Uytterhoeven
` (8 subsequent siblings)
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel, Adrian Bunk
[-- Attachment #1: m68k-sun3-possible-cleanups.diff --]
[-- Type: text/plain, Size: 6185 bytes --]
From: Adrian Bunk <bunk@kernel.org>
This patch contains the following possible cleanups:
- make the following needlessly global code static:
- config.c: sun3_bootmem_alloc()
- config.c: sun3_sched_init()
- dvma.c: dvma_page()
- idprom.c: struct Sun_Machines[]
- mmu_emu.c: struct ctx_alloc[]
- sun3dvma.c: iommu_use[]
- sun3ints.c: led_pattern[]
- remove the unused sbus.c
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
arch/m68k/sun3/Makefile | 2 +-
arch/m68k/sun3/config.c | 7 ++++---
arch/m68k/sun3/dvma.c | 2 +-
arch/m68k/sun3/idprom.c | 2 +-
arch/m68k/sun3/mmu_emu.c | 2 +-
arch/m68k/sun3/sbus.c | 27 ---------------------------
arch/m68k/sun3/sun3dvma.c | 2 +-
arch/m68k/sun3/sun3ints.c | 2 +-
include/asm-m68k/dvma.h | 2 --
include/asm-m68k/machines.h | 2 --
include/asm-m68k/sbus.h | 3 ---
11 files changed, 10 insertions(+), 43 deletions(-)
--- a/arch/m68k/sun3/Makefile
+++ b/arch/m68k/sun3/Makefile
@@ -2,6 +2,6 @@
# Makefile for Linux arch/m68k/sun3 source directory
#
-obj-y := sun3ints.o sun3dvma.o sbus.o idprom.o
+obj-y := sun3ints.o sun3dvma.o idprom.o
obj-$(CONFIG_SUN3) += config.o mmu_emu.o leds.o dvma.o intersil.o
--- a/arch/m68k/sun3/config.c
+++ b/arch/m68k/sun3/config.c
@@ -36,7 +36,7 @@ extern char _text, _end;
char sun3_reserved_pmeg[SUN3_PMEGS_NUM];
extern unsigned long sun3_gettimeoffset(void);
-extern void sun3_sched_init(irq_handler_t handler);
+static void sun3_sched_init(irq_handler_t handler);
extern void sun3_get_model (char* model);
extern void idprom_init (void);
extern int sun3_hwclk(int set, struct rtc_time *t);
@@ -114,7 +114,8 @@ static void sun3_halt (void)
/* sun3 bootmem allocation */
-void __init sun3_bootmem_alloc(unsigned long memory_start, unsigned long memory_end)
+static void __init sun3_bootmem_alloc(unsigned long memory_start,
+ unsigned long memory_end)
{
unsigned long start_page;
@@ -164,7 +165,7 @@ void __init config_sun3(void)
sun3_bootmem_alloc(memory_start, memory_end);
}
-void __init sun3_sched_init(irq_handler_t timer_routine)
+static void __init sun3_sched_init(irq_handler_t timer_routine)
{
sun3_disable_interrupts();
intersil_clock->cmd_reg=(INTERSIL_RUN|INTERSIL_INT_DISABLE|INTERSIL_24H_MODE);
--- a/arch/m68k/sun3/dvma.c
+++ b/arch/m68k/sun3/dvma.c
@@ -19,7 +19,7 @@
static unsigned long ptelist[120];
-inline unsigned long dvma_page(unsigned long kaddr, unsigned long vaddr)
+static unsigned long dvma_page(unsigned long kaddr, unsigned long vaddr)
{
unsigned long pte;
unsigned long j;
--- a/arch/m68k/sun3/idprom.c
+++ b/arch/m68k/sun3/idprom.c
@@ -25,7 +25,7 @@ static struct idprom idprom_buffer;
* of the Sparc CPU and have a meaningful IDPROM machtype value that we
* know about. See asm-sparc/machines.h for empirical constants.
*/
-struct Sun_Machine_Models Sun_Machines[NUM_SUN_MACHINES] = {
+static struct Sun_Machine_Models Sun_Machines[NUM_SUN_MACHINES] = {
/* First, Sun3's */
{ .name = "Sun 3/160 Series", .id_machtype = (SM_SUN3 | SM_3_160) },
{ .name = "Sun 3/50", .id_machtype = (SM_SUN3 | SM_3_50) },
--- a/arch/m68k/sun3/mmu_emu.c
+++ b/arch/m68k/sun3/mmu_emu.c
@@ -55,7 +55,7 @@ unsigned char pmeg_ctx[PMEGS_NUM];
/* pointers to the mm structs for each task in each
context. 0xffffffff is a marker for kernel context */
-struct mm_struct *ctx_alloc[CONTEXTS_NUM] = {
+static struct mm_struct *ctx_alloc[CONTEXTS_NUM] = {
[0] = (struct mm_struct *)0xffffffff
};
--- a/arch/m68k/sun3/sbus.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * SBus helper functions
- *
- * Sun3 don't have a sbus, but many of the used devices are also
- * used on Sparc machines with sbus. To avoid having a lot of
- * duplicate code, we provide necessary glue stuff to make using
- * of the sbus driver code possible.
- *
- * (C) 1999 Thomas Bogendoerfer (tsbogend@alpha.franken.de)
- */
-
-#include <linux/types.h>
-#include <linux/compiler.h>
-#include <linux/init.h>
-
-int __init sbus_init(void)
-{
- return 0;
-}
-
-void *sparc_alloc_io (u32 address, void *virtual, int len, char *name,
- u32 bus_type, int rdonly)
-{
- return (void *)address;
-}
-
-subsys_initcall(sbus_init);
--- a/arch/m68k/sun3/sun3dvma.c
+++ b/arch/m68k/sun3/sun3dvma.c
@@ -29,7 +29,7 @@ static inline void dvma_unmap_iommu(unsi
extern void sun3_dvma_init(void);
#endif
-unsigned long iommu_use[IOMMU_TOTAL_ENTRIES];
+static unsigned long iommu_use[IOMMU_TOTAL_ENTRIES];
#define dvma_index(baddr) ((baddr - DVMA_START) >> DVMA_PAGE_SHIFT)
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -30,7 +30,7 @@ void sun3_enable_interrupts(void)
sun3_enable_irq(0);
}
-int led_pattern[8] = {
+static int led_pattern[8] = {
~(0x80), ~(0x01),
~(0x40), ~(0x02),
~(0x20), ~(0x04),
--- a/include/asm-m68k/dvma.h
+++ b/include/asm-m68k/dvma.h
@@ -63,8 +63,6 @@ static inline int dvma_map_cpu(unsigned
return 0;
}
-extern unsigned long dvma_page(unsigned long kaddr, unsigned long vaddr);
-
#else /* Sun3x */
/* sun3x dvma page support */
--- a/include/asm-m68k/machines.h
+++ b/include/asm-m68k/machines.h
@@ -21,8 +21,6 @@ struct Sun_Machine_Models {
//#define NUM_SUN_MACHINES 23
#define NUM_SUN_MACHINES 8
-extern struct Sun_Machine_Models Sun_Machines[NUM_SUN_MACHINES];
-
/* The machine type in the idprom area looks like this:
*
* ---------------
--- a/include/asm-m68k/sbus.h
+++ b/include/asm-m68k/sbus.h
@@ -12,9 +12,6 @@ struct sbus_dev {
} reg_addrs[1];
};
-extern void *sparc_alloc_io (u32, void *, int, char *, u32, int);
-#define sparc_alloc_io(a,b,c,d,e,f) (a)
-
#define ARCH_SUN4 0
/* sbus IO functions stolen from include/asm-sparc/io.h for the serial driver */
--
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] 38+ messages in thread
* [patch 21/29] m68k: remove stale ARCH_SUN4 #define
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (19 preceding siblings ...)
2008-07-17 19:16 ` [patch 20/29] m68k/sun3/: possible cleanups Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 22/29] m68k/apollo: Add missing call to apollo_parse_bootinfo() Geert Uytterhoeven
` (7 subsequent siblings)
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel, Adrian Bunk
[-- Attachment #1: m68k-remove-stale-ARCH_SUN4-define.diff --]
[-- Type: text/plain, Size: 827 bytes --]
From: Adrian Bunk <bunk@stusta.de>
m68k: remove stale ARCH_SUN4 #define
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
include/asm-m68k/sbus.h | 2 --
1 file changed, 2 deletions(-)
--- a/include/asm-m68k/sbus.h
+++ b/include/asm-m68k/sbus.h
@@ -12,8 +12,6 @@ struct sbus_dev {
} reg_addrs[1];
};
-#define ARCH_SUN4 0
-
/* sbus IO functions stolen from include/asm-sparc/io.h for the serial driver */
/* No SBUS on the Sun3, kludge -- sam */
--
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] 38+ messages in thread
* [patch 22/29] m68k/apollo: Add missing call to apollo_parse_bootinfo()
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (20 preceding siblings ...)
2008-07-17 19:16 ` [patch 21/29] m68k: remove stale ARCH_SUN4 #define Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 23/29] m68k/Mac: remove the unused ADB_KEYBOARD option Geert Uytterhoeven
` (6 subsequent siblings)
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel
[-- Attachment #1: apollo-missing-bootinfo.diff --]
[-- Type: text/plain, Size: 1335 bytes --]
Add the missing call to apollo_parse_bootinfo(), which had been lost from a
big Apollo support patch by Peter De Schrijver in 1999.
Thanks to Adrian Bunk for noticing!
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
arch/m68k/kernel/setup.c | 3 +++
1 file changed, 3 insertions(+)
--- a/arch/m68k/kernel/setup.c
+++ b/arch/m68k/kernel/setup.c
@@ -122,6 +122,7 @@ extern int bvme6000_parse_bootinfo(const
extern int mvme16x_parse_bootinfo(const struct bi_record *);
extern int mvme147_parse_bootinfo(const struct bi_record *);
extern int hp300_parse_bootinfo(const struct bi_record *);
+extern int apollo_parse_bootinfo(const struct bi_record *);
extern void config_amiga(void);
extern void config_atari(void);
@@ -189,6 +190,8 @@ static void __init m68k_parse_bootinfo(c
unknown = mvme147_parse_bootinfo(record);
else if (MACH_IS_HP300)
unknown = hp300_parse_bootinfo(record);
+ else if (MACH_IS_APOLLO)
+ unknown = apollo_parse_bootinfo(record);
else
unknown = 1;
}
--
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] 38+ messages in thread
* [patch 23/29] m68k/Mac: remove the unused ADB_KEYBOARD option
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (21 preceding siblings ...)
2008-07-17 19:16 ` [patch 22/29] m68k/apollo: Add missing call to apollo_parse_bootinfo() Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 24/29] m68k/Atari: remove the dead ATARI_SCC{,_DMA} options Geert Uytterhoeven
` (5 subsequent siblings)
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel, Adrian Bunk
[-- Attachment #1: m68k-mac-remove-the-unused-ADB_KEYBOARD-option.diff --]
[-- Type: text/plain, Size: 1315 bytes --]
From: Adrian Bunk <bunk@kernel.org>
When the driver was removed back in 2002 the option was forgotten.
Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
arch/m68k/Kconfig | 12 ------------
1 file changed, 12 deletions(-)
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -578,18 +578,6 @@ config MAC_HID
depends on INPUT_ADBHID
default y
-config ADB_KEYBOARD
- bool "Support for ADB keyboard (old driver)"
- depends on MAC && !INPUT_ADBHID
- help
- This option allows you to use an ADB keyboard attached to your
- machine. Note that this disables any other (ie. PS/2) keyboard
- support, even if your machine is physically capable of using both at
- the same time.
-
- If you use an ADB keyboard (4 pin connector), say Y here.
- If you use a PS/2 keyboard (6 pin connector), say N here.
-
config HPDCA
tristate "HP DCA serial support"
depends on DIO && SERIAL_8250
--
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] 38+ messages in thread
* [patch 24/29] m68k/Atari: remove the dead ATARI_SCC{,_DMA} options
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (22 preceding siblings ...)
2008-07-17 19:16 ` [patch 23/29] m68k/Mac: remove the unused ADB_KEYBOARD option Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 25/29] m68k/Apollo: remove the unused APOLLO_ELPLUS option Geert Uytterhoeven
` (4 subsequent siblings)
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel, Adrian Bunk
[-- Attachment #1: m68k-atari-remove-the-dead-ATARI_SCC-options.diff --]
[-- Type: text/plain, Size: 2644 bytes --]
From: Adrian Bunk <bunk@kernel.org>
It seems the driver was removed back in kernel 2.3 but the options were
forgotten.
Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
arch/m68k/Kconfig | 24 +-----------------------
1 file changed, 1 insertion(+), 23 deletions(-)
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -490,28 +490,6 @@ config ATARI_MFPSER
Note for Falcon users: You also have an MFP port, it's just not
wired to the outside... But you could use the port under Linux.
-config ATARI_SCC
- tristate "Atari SCC serial support"
- depends on ATARI
- ---help---
- If you have serial ports based on a Zilog SCC chip (Modem2, Serial2,
- LAN) and like to use them under Linux, say Y. All built-in SCC's are
- supported (TT, MegaSTE, Falcon), and also the ST-ESCC. If you have
- two connectors for channel A (Serial2 and LAN), they are visible as
- two separate devices.
-
- To compile this driver as a module, choose M here.
-
-config ATARI_SCC_DMA
- bool "Atari SCC serial DMA support"
- depends on ATARI_SCC
- help
- This enables DMA support for receiving data on channel A of the SCC.
- If you have a TT you may say Y here and read
- drivers/char/atari_SCC.README. All other users should say N here,
- because only the TT has SCC-DMA, even if your machine keeps claiming
- so at boot time.
-
config ATARI_MIDI
tristate "Atari MIDI serial support"
depends on ATARI
@@ -628,7 +606,7 @@ config DN_SERIAL
config SERIAL_CONSOLE
bool "Support for serial port console"
- depends on (AMIGA || ATARI || MAC || SUN3 || SUN3X || VME || APOLLO) && (ATARI_MFPSER=y || ATARI_SCC=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)
+ 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)
---help---
If you say Y here, it will be possible to use a serial port as the
system console (the system console is the device which receives all
--
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] 38+ messages in thread
* [patch 25/29] m68k/Apollo: remove the unused APOLLO_ELPLUS option
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (23 preceding siblings ...)
2008-07-17 19:16 ` [patch 24/29] m68k/Atari: remove the dead ATARI_SCC{,_DMA} options Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 26/29] arch/m68k/mm/motorola.c: Eliminate NULL test and memset after alloc_bootmem Geert Uytterhoeven
` (3 subsequent siblings)
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel, Adrian Bunk
[-- Attachment #1: m68k-apollo-remove-the-unused-APOLLO_ELPLUS-option.diff --]
[-- Type: text/plain, Size: 1320 bytes --]
Looking at older kernel sources the APOLLO_ELPLUS option was added
somewhere during kernel 2.1, but even kernel 2.2.0 does not contain
any driver that would be enabled through it...
Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/net/Kconfig | 9 ---------
1 file changed, 9 deletions(-)
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -333,15 +333,6 @@ config APNE
To compile this driver as a module, choose M here: the module
will be called apne.
-config APOLLO_ELPLUS
- tristate "Apollo 3c505 support"
- depends on APOLLO
- help
- Say Y or M here if your Apollo has a 3Com 3c505 ISA Ethernet card.
- If you don't have one made for Apollos, you can use one from a PC,
- except that your Apollo won't be able to boot from it (because the
- code in the ROM will be for a PC).
-
config MAC8390
bool "Macintosh NS 8390 based ethernet cards"
depends on MAC
--
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] 38+ messages in thread
* [patch 26/29] arch/m68k/mm/motorola.c: Eliminate NULL test and memset after alloc_bootmem
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (24 preceding siblings ...)
2008-07-17 19:16 ` [patch 25/29] m68k/Apollo: remove the unused APOLLO_ELPLUS option Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 27/29] arch/m68k/mm/sun3mmu.c: " Geert Uytterhoeven
` (2 subsequent siblings)
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel, Julia Lawall
[-- Attachment #1: m68k-motorola-eliminate-NULL-test-and-memset-after-alloc_bootmem.diff --]
[-- Type: text/plain, Size: 1496 bytes --]
From: Julia Lawall <julia@diku.dk>
As noted by Akinobu Mita in patch b1fceac2b9e04d278316b2faddf276015fc06e3b,
alloc_bootmem and related functions never return NULL and always return a
zeroed region of memory. Thus a NULL test or memset after calls to these
functions is unnecessary.
This was fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@@
expression E;
statement S;
@@
E = \(alloc_bootmem\|alloc_bootmem_low\|alloc_bootmem_pages\|alloc_bootmem_low_pages\)(...)
.. when != E
(
- BUG_ON (E == NULL);
|
- if (E == NULL) S
)
@@
expression E,E1;
@@
E = \(alloc_bootmem\|alloc_bootmem_low\|alloc_bootmem_pages\|alloc_bootmem_low_pages\)(...)
.. when != E
- memset(E,0,E1);
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
arch/m68k/mm/motorola.c | 1 -
1 file changed, 1 deletion(-)
--- a/arch/m68k/mm/motorola.c
+++ b/arch/m68k/mm/motorola.c
@@ -285,7 +285,6 @@ void __init paging_init(void)
* to a couple of allocated pages
*/
empty_zero_page = alloc_bootmem_pages(PAGE_SIZE);
- memset(empty_zero_page, 0, PAGE_SIZE);
/*
* Set up SFC/DFC registers
--
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] 38+ messages in thread
* [patch 27/29] arch/m68k/mm/sun3mmu.c: Eliminate NULL test and memset after alloc_bootmem
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (25 preceding siblings ...)
2008-07-17 19:16 ` [patch 26/29] arch/m68k/mm/motorola.c: Eliminate NULL test and memset after alloc_bootmem Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 28/29] dio: use dio_match_device() in dio_bus_match() Geert Uytterhoeven
2008-07-17 19:16 ` [patch 29/29] initrd: Fix virtual/physical mix-up in overwrite test Geert Uytterhoeven
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel, Julia Lawall
[-- Attachment #1: m68k-sun3-eliminate-NULL-test-and-memset-after-alloc_bootmem.diff --]
[-- Type: text/plain, Size: 1493 bytes --]
From: Julia Lawall <julia@diku.dk>
As noted by Akinobu Mita in patch b1fceac2b9e04d278316b2faddf276015fc06e3b,
alloc_bootmem and related functions never return NULL and always return a
zeroed region of memory. Thus a NULL test or memset after calls to these
functions is unnecessary.
This was fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@@
expression E;
statement S;
@@
E = \(alloc_bootmem\|alloc_bootmem_low\|alloc_bootmem_pages\|alloc_bootmem_low_pages\)(...)
.. when != E
(
- BUG_ON (E == NULL);
|
- if (E == NULL) S
)
@@
expression E,E1;
@@
E = \(alloc_bootmem\|alloc_bootmem_low\|alloc_bootmem_pages\|alloc_bootmem_low_pages\)(...)
.. when != E
- memset(E,0,E1);
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
arch/m68k/mm/sun3mmu.c | 1 -
1 file changed, 1 deletion(-)
--- a/arch/m68k/mm/sun3mmu.c
+++ b/arch/m68k/mm/sun3mmu.c
@@ -53,7 +53,6 @@ void __init paging_init(void)
wp_works_ok = 0;
#endif
empty_zero_page = alloc_bootmem_pages(PAGE_SIZE);
- memset(empty_zero_page, 0, PAGE_SIZE);
address = PAGE_OFFSET;
pg_dir = swapper_pg_dir;
--
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] 38+ messages in thread
* [patch 28/29] dio: use dio_match_device() in dio_bus_match()
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (26 preceding siblings ...)
2008-07-17 19:16 ` [patch 27/29] arch/m68k/mm/sun3mmu.c: " Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 29/29] initrd: Fix virtual/physical mix-up in overwrite test Geert Uytterhoeven
28 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel, Akinobu Mita
[-- Attachment #1: dio-use-dio_match_device.diff --]
[-- Type: text/plain, Size: 1062 bytes --]
From: Akinobu Mita <akinobu.mita@gmail.com>
dio_bus_match() can use dio_match_device().
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/dio/dio-driver.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
--- a/drivers/dio/dio-driver.c
+++ b/drivers/dio/dio-driver.c
@@ -119,19 +119,7 @@ static int dio_bus_match(struct device *
if (!ids)
return 0;
- while (ids->id) {
- if (ids->id == DIO_WILDCARD)
- return 1;
- if (DIO_NEEDSSECID(ids->id & 0xff)) {
- if (ids->id == d->id)
- return 1;
- } else {
- if ((ids->id & 0xff) == (d->id & 0xff))
- return 1;
- }
- ids++;
- }
- return 0;
+ return dio_match_device(ids, d) ? 1 : 0;
}
--
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] 38+ messages in thread
* [patch 29/29] initrd: Fix virtual/physical mix-up in overwrite test
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
` (27 preceding siblings ...)
2008-07-17 19:16 ` [patch 28/29] dio: use dio_match_device() in dio_bus_match() Geert Uytterhoeven
@ 2008-07-17 19:16 ` Geert Uytterhoeven
2008-07-24 15:35 ` Atsushi Nemoto
28 siblings, 1 reply; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-17 19:16 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-m68k, linux-kernel
[-- Attachment #1: m68k-initrd-fix.diff --]
[-- Type: text/plain, Size: 2246 bytes --]
From: Geert Uytterhoeven <geert@linux-m68k.org>
On recent kernels, I get the following error when using an initrd:
| initrd overwritten (0x00b78000 < 0x07668000) - disabling it.
My Amiga 4000 has 12 MiB of RAM at physical address 0x07400000 (virtual
0x00000000).
The initrd is located at the end of RAM: 0x00b78000 - 0x00c00000 (virtual).
The overwrite test compares the (virtual) initrd location to the (physical)
first available memory location, which fails.
This patch converts initrd_start to a page frame number, so it can safely be
compared with min_low_pfn.
Before the introduction of discontiguous memory support on m68k
(12d810c1b8c2b913d48e629e2b5c01d105029839), min_low_pfn was just left
untouched by the m68k-specific code (zero, I guess), and everything worked
fine.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
On several platforms, initrd_below_start_ok is set to 1:
| arch/mips/kernel/setup.c: initrd_below_start_ok = 1;
| arch/parisc/mm/init.c: initrd_below_start_ok = 1;
| arch/powerpc/kernel/prom.c: initrd_below_start_ok = 1;
| arch/ppc/platforms/hdpu.c: initrd_below_start_ok = 1;
| arch/xtensa/kernel/setup.c: initrd_below_start_ok = 1;
Some of these may be workarounds for this bug. Please check.
init/main.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/init/main.c
+++ b/init/main.c
@@ -630,9 +630,10 @@ asmlinkage void __init start_kernel(void
#ifdef CONFIG_BLK_DEV_INITRD
if (initrd_start && !initrd_below_start_ok &&
- initrd_start < min_low_pfn << PAGE_SHIFT) {
+ page_to_pfn(virt_to_page(initrd_start)) < min_low_pfn) {
printk(KERN_CRIT "initrd overwritten (0x%08lx < 0x%08lx) - "
- "disabling it.\n",initrd_start,min_low_pfn << PAGE_SHIFT);
+ "disabling it.\n",
+ page_to_pfn(virt_to_page(initrd_start)), min_low_pfn);
initrd_start = 0;
}
#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
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [patch 02/29] ariadne: use netstats in net_device structure
2008-07-17 19:16 ` [patch 02/29] ariadne: use netstats in net_device structure Geert Uytterhoeven
@ 2008-07-17 19:45 ` Jeff Garzik
0 siblings, 0 replies; 38+ messages in thread
From: Jeff Garzik @ 2008-07-17 19:45 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Linus Torvalds, Andrew Morton, linux-m68k, linux-kernel,
linux-net, Paulius Zaleckas
Geert Uytterhoeven wrote:
> From: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
>
> Use net_device_stats from net_device structure instead of local.
>
> Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [patch 17/29] m68k/atari/debug.c: possible cleanups
2008-07-17 19:16 ` [patch 17/29] m68k/atari/debug.c: " Geert Uytterhoeven
@ 2008-07-20 20:06 ` Michael Schmitz
2008-07-21 0:11 ` Geert Uytterhoeven
0 siblings, 1 reply; 38+ messages in thread
From: Michael Schmitz @ 2008-07-20 20:06 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Linus Torvalds, Andrew Morton, linux-m68k, linux-kernel, Adrian Bunk
Hi,
> - remove the following unused variables:
> - atari_SCC_init_done
That one I'll need to reintroduce for the SCC driver rewrite (which is
still stuck in Geert's queue pending cleanups by me).
Michael
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [patch 17/29] m68k/atari/debug.c: possible cleanups
2008-07-20 20:06 ` Michael Schmitz
@ 2008-07-21 0:11 ` Geert Uytterhoeven
0 siblings, 0 replies; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-21 0:11 UTC (permalink / raw)
To: Michael Schmitz
Cc: Linus Torvalds, Andrew Morton, linux-m68k, linux-kernel, Adrian Bunk
On Sun, 20 Jul 2008, Michael Schmitz wrote:
> > - remove the following unused variables:
> > - atari_SCC_init_done
>
> That one I'll need to reintroduce for the SCC driver rewrite (which is still
> stuck in Geert's queue pending cleanups by me).
I already have a reintroducing patch in my queue, So Linus can just
apply the removal patch for now.
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] 38+ messages in thread
* Re: [patch 29/29] initrd: Fix virtual/physical mix-up in overwrite test
2008-07-17 19:16 ` [patch 29/29] initrd: Fix virtual/physical mix-up in overwrite test Geert Uytterhoeven
@ 2008-07-24 15:35 ` Atsushi Nemoto
2008-07-24 18:49 ` Geert Uytterhoeven
0 siblings, 1 reply; 38+ messages in thread
From: Atsushi Nemoto @ 2008-07-24 15:35 UTC (permalink / raw)
To: geert, ralf; +Cc: torvalds, akpm, linux-m68k, linux-kernel
On Thu, 17 Jul 2008 21:16:36 +0200, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> if (initrd_start && !initrd_below_start_ok &&
> - initrd_start < min_low_pfn << PAGE_SHIFT) {
> + page_to_pfn(virt_to_page(initrd_start)) < min_low_pfn) {
> printk(KERN_CRIT "initrd overwritten (0x%08lx < 0x%08lx) - "
> - "disabling it.\n",initrd_start,min_low_pfn << PAGE_SHIFT);
> + "disabling it.\n",
> + page_to_pfn(virt_to_page(initrd_start)), min_low_pfn);
> initrd_start = 0;
> }
This patch causes warnings on mips:
linux/init/main.c: In function 'start_kernel':
linux/init/main.c:633: warning: passing argument 1 of 'virt_to_phys' makes pointer from integer without a cast
linux/init/main.c:636: warning: passing argument 1 of 'virt_to_phys' makes pointer from integer without a cast
Because an argument of mips virt_to_phys() is an pointer and
initrd_start is unsigned long. It seems most (all?) arch's
virt_to_phys() casts its argument to unsigned long internally. Should
mips follow?
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [patch 29/29] initrd: Fix virtual/physical mix-up in overwrite test
2008-07-24 15:35 ` Atsushi Nemoto
@ 2008-07-24 18:49 ` Geert Uytterhoeven
2008-07-25 16:27 ` Atsushi Nemoto
0 siblings, 1 reply; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-24 18:49 UTC (permalink / raw)
To: Atsushi Nemoto
Cc: Ralf Baechle, Linus Torvalds, Andrew Morton, linux-m68k,
Linux Kernel Development, Linux/MIPS Development, linux-arch
Hi Nemoto-san,
On Fri, 25 Jul 2008, Atsushi Nemoto wrote:
> On Thu, 17 Jul 2008 21:16:36 +0200, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > if (initrd_start && !initrd_below_start_ok &&
> > - initrd_start < min_low_pfn << PAGE_SHIFT) {
> > + page_to_pfn(virt_to_page(initrd_start)) < min_low_pfn) {
> > printk(KERN_CRIT "initrd overwritten (0x%08lx < 0x%08lx) - "
> > - "disabling it.\n",initrd_start,min_low_pfn << PAGE_SHIFT);
> > + "disabling it.\n",
> > + page_to_pfn(virt_to_page(initrd_start)), min_low_pfn);
> > initrd_start = 0;
> > }
>
> This patch causes warnings on mips:
>
> linux/init/main.c: In function 'start_kernel':
> linux/init/main.c:633: warning: passing argument 1 of 'virt_to_phys' makes pointer from integer without a cast
> linux/init/main.c:636: warning: passing argument 1 of 'virt_to_phys' makes pointer from integer without a cast
>
> Because an argument of mips virt_to_phys() is an pointer and
> initrd_start is unsigned long. It seems most (all?) arch's
> virt_to_phys() casts its argument to unsigned long internally. Should
> mips follow?
Alternatively, as initrd_start is really a virtual kernel address,
perhaps it should be changed from unsigned long to void * instead?
It's cast to `void *' in several place. arch/xtensa/kernel/setup.c even
has `extern void *initrd_start' to fool around this?
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] 38+ messages in thread
* Re: [patch 29/29] initrd: Fix virtual/physical mix-up in overwrite test
2008-07-24 18:49 ` Geert Uytterhoeven
@ 2008-07-25 16:27 ` Atsushi Nemoto
2008-07-25 19:22 ` Geert Uytterhoeven
0 siblings, 1 reply; 38+ messages in thread
From: Atsushi Nemoto @ 2008-07-25 16:27 UTC (permalink / raw)
To: geert
Cc: ralf, torvalds, akpm, linux-m68k, linux-kernel, linux-mips, linux-arch
On Thu, 24 Jul 2008 20:49:27 +0200 (CEST), Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > Because an argument of mips virt_to_phys() is an pointer and
> > initrd_start is unsigned long. It seems most (all?) arch's
> > virt_to_phys() casts its argument to unsigned long internally. Should
> > mips follow?
>
> Alternatively, as initrd_start is really a virtual kernel address,
> perhaps it should be changed from unsigned long to void * instead?
>
> It's cast to `void *' in several place. arch/xtensa/kernel/setup.c even
> has `extern void *initrd_start' to fool around this?
I agree it would make code cleaner, but the conversion might be
somewhat hard.
If we converted initrd_start (and initrd_end) to void *, we should
also convert INITRD_START, free_initrd_mem(), some other arch specific
local/global variables and printk format strings. Also code like
"initrd_start & PAGE_MASK" should be changed too...
Is it worth to do?
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [patch 29/29] initrd: Fix virtual/physical mix-up in overwrite test
2008-07-25 16:27 ` Atsushi Nemoto
@ 2008-07-25 19:22 ` Geert Uytterhoeven
2008-07-26 14:46 ` Atsushi Nemoto
0 siblings, 1 reply; 38+ messages in thread
From: Geert Uytterhoeven @ 2008-07-25 19:22 UTC (permalink / raw)
To: Atsushi Nemoto
Cc: ralf, torvalds, akpm, linux-m68k, linux-kernel, linux-mips, linux-arch
[-- Attachment #1: Type: TEXT/PLAIN, Size: 3610 bytes --]
On Sat, 26 Jul 2008, Atsushi Nemoto wrote:
> On Thu, 24 Jul 2008 20:49:27 +0200 (CEST), Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > Because an argument of mips virt_to_phys() is an pointer and
> > > initrd_start is unsigned long. It seems most (all?) arch's
> > > virt_to_phys() casts its argument to unsigned long internally. Should
> > > mips follow?
> >
> > Alternatively, as initrd_start is really a virtual kernel address,
> > perhaps it should be changed from unsigned long to void * instead?
> >
> > It's cast to `void *' in several place. arch/xtensa/kernel/setup.c even
> > has `extern void *initrd_start' to fool around this?
>
> I agree it would make code cleaner, but the conversion might be
> somewhat hard.
>
> If we converted initrd_start (and initrd_end) to void *, we should
> also convert INITRD_START, free_initrd_mem(), some other arch specific
> local/global variables and printk format strings. Also code like
> "initrd_start & PAGE_MASK" should be changed too...
>
> Is it worth to do?
Maybe not.
Several free_initrd_mem() implementations (including the mips one, which
has to call virt_to_phys()) just cast the parameters to `void *'.
Others call free_area() or free_init_pages() (other callers of these have to
cast `void *' to `unsigned long'!).
Further, we have:
memset((void *)initrd_start, 0, initrd_end - initrd_start);
I agree `unsigned long' is nicer for `for (; start < end; start +=
PAGE_SIZE)' loops and `initrd_start & PAGE_MASK' (don't we have a macro
for that?), though.
So there's definitely room for a small janitors project...
Probably the best short term solution is to make mips' virt_to_page()
cast to `unsigned long' internally, like the other platforms.
Alternatively, you can try the patch below (compile-tested on mips :-),
which does add a cast to the generic code.
Subject: [PATCH] initrd: cast `initrd_start' to `void *'
commit fb6624ebd912e3d6907ca6490248e73368223da9 (initrd: Fix virtual/physical
mix-up in overwrite test) introduced the compiler warning below on mips,
as its virt_to_page() doesn't cast the passed address to unsigned long
internally, unlike on most other architectures:
init/main.c: In function ‘start_kernel’:
init/main.c:633: warning: passing argument 1 of ‘virt_to_phys’ makes pointer from integer without a cast
init/main.c:636: warning: passing argument 1 of ‘virt_to_phys’ makes pointer from integer without a cast
For now, kill the warning by explicitly casting initrd_start to `void *', as
that's the type it should really be.
Noticed by Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
diff --git a/init/main.c b/init/main.c
index 756eca4..525b2ac 100644
--- a/init/main.c
+++ b/init/main.c
@@ -630,10 +630,11 @@ asmlinkage void __init start_kernel(void)
#ifdef CONFIG_BLK_DEV_INITRD
if (initrd_start && !initrd_below_start_ok &&
- page_to_pfn(virt_to_page(initrd_start)) < min_low_pfn) {
+ page_to_pfn(virt_to_page((void *)initrd_start)) < min_low_pfn) {
printk(KERN_CRIT "initrd overwritten (0x%08lx < 0x%08lx) - "
"disabling it.\n",
- page_to_pfn(virt_to_page(initrd_start)), min_low_pfn);
+ page_to_pfn(virt_to_page((void *)initrd_start)),
+ min_low_pfn);
initrd_start = 0;
}
#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
^ permalink raw reply related [flat|nested] 38+ messages in thread
* Re: [patch 29/29] initrd: Fix virtual/physical mix-up in overwrite test
2008-07-25 19:22 ` Geert Uytterhoeven
@ 2008-07-26 14:46 ` Atsushi Nemoto
0 siblings, 0 replies; 38+ messages in thread
From: Atsushi Nemoto @ 2008-07-26 14:46 UTC (permalink / raw)
To: geert
Cc: ralf, torvalds, akpm, linux-m68k, linux-kernel, linux-mips, linux-arch
On Fri, 25 Jul 2008 21:22:20 +0200 (CEST), Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> So there's definitely room for a small janitors project...
>
> Probably the best short term solution is to make mips' virt_to_page()
> cast to `unsigned long' internally, like the other platforms.
>
> Alternatively, you can try the patch below (compile-tested on mips :-),
> which does add a cast to the generic code.
Thanks, I prefer this one for short term solution, while I think
explicit argument type would be better in general.
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 38+ messages in thread
end of thread, other threads:[~2008-07-26 14:44 UTC | newest]
Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-17 19:16 [patch 00/29] m68k patches for 2.6.27 Geert Uytterhoeven
2008-07-17 19:16 ` [patch 01/29] m68k: remove CVS keywords Geert Uytterhoeven
2008-07-17 19:16 ` [patch 02/29] ariadne: use netstats in net_device structure Geert Uytterhoeven
2008-07-17 19:45 ` Jeff Garzik
2008-07-17 19:16 ` [patch 03/29] m68k: Return -ENODEV if no device is found Geert Uytterhoeven
2008-07-17 19:16 ` [patch 04/29] m68k: vmlinux-std/sun3.lds.S cleanup - use PAGE_SIZE macro Geert Uytterhoeven
2008-07-17 19:16 ` [patch 05/29] m68k: Allow no CPU/platform type for allnoconfig Geert Uytterhoeven
2008-07-17 19:16 ` [patch 06/29] m68k: remove -traditional Geert Uytterhoeven
2008-07-17 19:16 ` [patch 07/29] m68k: make multi_defconfig the default defconfig Geert Uytterhoeven
2008-07-17 19:16 ` [patch 08/29] m68k: remove AP1000 code Geert Uytterhoeven
2008-07-17 19:16 ` [patch 09/29] ZORRO: Replace deprecated __initcall with equivalent device_initcall Geert Uytterhoeven
2008-07-17 19:16 ` [patch 10/29] zorro: use memory_read_from_buffer Geert Uytterhoeven
2008-07-17 19:16 ` [patch 11/29] amifb: Register Amiga-specific video modes with sysfs Geert Uytterhoeven
2008-07-17 19:16 ` [patch 12/29] atafb: Register Atari-specific " Geert Uytterhoeven
2008-07-17 19:16 ` [patch 13/29] drivers/video/c2p.c: add MODULE_LICENSE Geert Uytterhoeven
2008-07-17 19:16 ` [patch 14/29] export amiga_vblank Geert Uytterhoeven
2008-07-17 19:16 ` [patch 15/29] export c2p Geert Uytterhoeven
2008-07-17 19:16 ` [patch 16/29] m68k/amiga/: possible cleanups Geert Uytterhoeven
2008-07-17 19:16 ` [patch 17/29] m68k/atari/debug.c: " Geert Uytterhoeven
2008-07-20 20:06 ` Michael Schmitz
2008-07-21 0:11 ` Geert Uytterhoeven
2008-07-17 19:16 ` [patch 18/29] m68k/mac/: " Geert Uytterhoeven
2008-07-17 19:16 ` [patch 19/29] m68k/q40/config.c: make functions static Geert Uytterhoeven
2008-07-17 19:16 ` [patch 20/29] m68k/sun3/: possible cleanups Geert Uytterhoeven
2008-07-17 19:16 ` [patch 21/29] m68k: remove stale ARCH_SUN4 #define Geert Uytterhoeven
2008-07-17 19:16 ` [patch 22/29] m68k/apollo: Add missing call to apollo_parse_bootinfo() Geert Uytterhoeven
2008-07-17 19:16 ` [patch 23/29] m68k/Mac: remove the unused ADB_KEYBOARD option Geert Uytterhoeven
2008-07-17 19:16 ` [patch 24/29] m68k/Atari: remove the dead ATARI_SCC{,_DMA} options Geert Uytterhoeven
2008-07-17 19:16 ` [patch 25/29] m68k/Apollo: remove the unused APOLLO_ELPLUS option Geert Uytterhoeven
2008-07-17 19:16 ` [patch 26/29] arch/m68k/mm/motorola.c: Eliminate NULL test and memset after alloc_bootmem Geert Uytterhoeven
2008-07-17 19:16 ` [patch 27/29] arch/m68k/mm/sun3mmu.c: " Geert Uytterhoeven
2008-07-17 19:16 ` [patch 28/29] dio: use dio_match_device() in dio_bus_match() Geert Uytterhoeven
2008-07-17 19:16 ` [patch 29/29] initrd: Fix virtual/physical mix-up in overwrite test Geert Uytterhoeven
2008-07-24 15:35 ` Atsushi Nemoto
2008-07-24 18:49 ` Geert Uytterhoeven
2008-07-25 16:27 ` Atsushi Nemoto
2008-07-25 19:22 ` Geert Uytterhoeven
2008-07-26 14:46 ` Atsushi Nemoto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).