Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8cf7a16e authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull m68k updates from Geert Uytterhoeven:
 - Zorro bus cleanups and UAPI revival
 - Bootinfo cleanups and UAPI revival
 - Kexec support
 - Memory size reductions and bug fixes for multi-platform kernels
 - Polled interrupt support for Atari EtherNAT, EtherNEC and NetUSBee
 - Machine-specific random_get_entropy()
 - Defconfig updates and cleanups

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: (46 commits)
  m68k/mac: Make SCC reset work more reliably
  m68k/irq - Use polled IRQ flag for MFP timer cascaded interrupts
  m68k: Update defconfigs for v3.13-rc1
  m68k/defconfig: Enable EARLY_PRINTK
  m68k/mm: kmap spelling/grammar fixes
  m68k: Convert arch/m68k/kernel/traps.c to pr_*()
  m68k: Convert arch/m68k/mm/fault.c to pr_*()
  m68k/mm: Check for mm != NULL in do_page_fault() debug code
  m68k/defconfig: Disable /sbin/hotplug fork-bomb by default
  m68k/atari: Hide RTC_PORT() macro from rtc-cmos
  m68k/amiga,atari: Fix specifying multiple debug= parameters
  m68k/defconfig: Use ext4 for ext2/ext3 file systems
  m68k: Add support to export bootinfo in procfs
  m68k: Add kexec support
  m68k/mac: Mark Mac IIsi ADB driver BROKEN
  m68k/amiga: Provide mach_random_get_entropy()
  m68k: Add infrastructure for machine-specific random_get_entropy()
  m68k/atari: Call paging_init() before nf_init()
  m68k: Remove superfluous inclusions of <asm/bootinfo.h>
  m68k/UAPI: Use proper types (endianness/size) in <asm/bootinfo*.h>
  ...
parents f479c01c 56931d73
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -95,8 +95,9 @@ The treatment of these regions depends on the type of Zorro space:
-------------

linux/include/linux/zorro.h
linux/include/asm-{m68k,ppc}/zorro.h
linux/include/linux/zorro_ids.h
linux/include/uapi/linux/zorro.h
linux/include/uapi/linux/zorro_ids.h
linux/arch/m68k/include/asm/zorro.h
linux/drivers/zorro
/proc/bus/zorro
+24 −0
Original line number Diff line number Diff line
@@ -87,6 +87,30 @@ config MMU_SUN3
	bool
	depends on MMU && !MMU_MOTOROLA && !MMU_COLDFIRE

config KEXEC
	bool "kexec system call"
	depends on M68KCLASSIC
	help
	  kexec is a system call that implements the ability to shutdown your
	  current kernel, and to start another kernel.  It is like a reboot
	  but it is independent of the system firmware.   And like a reboot
	  you can start any kernel with it, not just Linux.

	  The name comes from the similarity to the exec system call.

	  It is an ongoing process to be certain the hardware in a machine
	  is properly shutdown, so do not be surprised if this code does not
	  initially work for you.  As of this writing the exact hardware
	  interface is strongly in flux, so no good recommendation can be
	  made.

config BOOTINFO_PROC
	bool "Export bootinfo in procfs"
	depends on KEXEC && M68KCLASSIC
	help
	  Say Y to export the bootinfo used to boot the kernel in a
	  "bootinfo" file in procfs.  This is useful with kexec.

menu "Platform setup"

source arch/m68k/Kconfig.cpu
+1 −1
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ void *amiga_chip_alloc_res(unsigned long size, struct resource *res)

	atomic_sub(size, &chipavail);
	pr_debug("amiga_chip_alloc_res: returning %pR\n", res);
	return (void *)ZTWO_VADDR(res->start);
	return ZTWO_VADDR(res->start);
}

void amiga_chip_free(void *ptr)
+42 −21
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@
#include <linux/keyboard.h>

#include <asm/bootinfo.h>
#include <asm/bootinfo-amiga.h>
#include <asm/byteorder.h>
#include <asm/setup.h>
#include <asm/pgtable.h>
#include <asm/amigahw.h>
@@ -140,46 +142,46 @@ static struct resource ram_resource[NUM_MEMINFO];
     *  Parse an Amiga-specific record in the bootinfo
     */

int amiga_parse_bootinfo(const struct bi_record *record)
int __init amiga_parse_bootinfo(const struct bi_record *record)
{
	int unknown = 0;
	const unsigned long *data = record->data;
	const void *data = record->data;

	switch (record->tag) {
	switch (be16_to_cpu(record->tag)) {
	case BI_AMIGA_MODEL:
		amiga_model = *data;
		amiga_model = be32_to_cpup(data);
		break;

	case BI_AMIGA_ECLOCK:
		amiga_eclock = *data;
		amiga_eclock = be32_to_cpup(data);
		break;

	case BI_AMIGA_CHIPSET:
		amiga_chipset = *data;
		amiga_chipset = be32_to_cpup(data);
		break;

	case BI_AMIGA_CHIP_SIZE:
		amiga_chip_size = *(const int *)data;
		amiga_chip_size = be32_to_cpup(data);
		break;

	case BI_AMIGA_VBLANK:
		amiga_vblank = *(const unsigned char *)data;
		amiga_vblank = *(const __u8 *)data;
		break;

	case BI_AMIGA_PSFREQ:
		amiga_psfreq = *(const unsigned char *)data;
		amiga_psfreq = *(const __u8 *)data;
		break;

	case BI_AMIGA_AUTOCON:
#ifdef CONFIG_ZORRO
		if (zorro_num_autocon < ZORRO_NUM_AUTO) {
			const struct ConfigDev *cd = (struct ConfigDev *)data;
			struct zorro_dev *dev = &zorro_autocon[zorro_num_autocon++];
			const struct ConfigDev *cd = data;
			struct zorro_dev_init *dev = &zorro_autocon_init[zorro_num_autocon++];
			dev->rom = cd->cd_Rom;
			dev->slotaddr = cd->cd_SlotAddr;
			dev->slotsize = cd->cd_SlotSize;
			dev->resource.start = (unsigned long)cd->cd_BoardAddr;
			dev->resource.end = dev->resource.start + cd->cd_BoardSize - 1;
			dev->slotaddr = be16_to_cpu(cd->cd_SlotAddr);
			dev->slotsize = be16_to_cpu(cd->cd_SlotSize);
			dev->boardaddr = be32_to_cpu(cd->cd_BoardAddr);
			dev->boardsize = be32_to_cpu(cd->cd_BoardSize);
		} else
			printk("amiga_parse_bootinfo: too many AutoConfig devices\n");
#endif /* CONFIG_ZORRO */
@@ -358,6 +360,14 @@ static void __init amiga_identify(void)
#undef AMIGAHW_ANNOUNCE
}


static unsigned long amiga_random_get_entropy(void)
{
	/* VPOSR/VHPOSR provide at least 17 bits of data changing at 1.79 MHz */
	return *(unsigned long *)&amiga_custom.vposr;
}


    /*
     *  Setup the Amiga configuration info
     */
@@ -395,6 +405,8 @@ void __init config_amiga(void)
	mach_heartbeat = amiga_heartbeat;
#endif

	mach_random_get_entropy = amiga_random_get_entropy;

	/* Fill in the clock value (based on the 700 kHz E-Clock) */
	amiga_colorclock = 5*amiga_eclock;	/* 3.5 MHz */

@@ -608,6 +620,8 @@ static void amiga_mem_console_write(struct console *co, const char *s,

static int __init amiga_savekmsg_setup(char *arg)
{
	bool registered;

	if (!MACH_IS_AMIGA || strcmp(arg, "mem"))
		return 0;

@@ -618,13 +632,15 @@ static int __init amiga_savekmsg_setup(char *arg)

	/* Just steal the block, the chipram allocator isn't functional yet */
	amiga_chip_size -= SAVEKMSG_MAXMEM;
	savekmsg = (void *)ZTWO_VADDR(CHIP_PHYSADDR + amiga_chip_size);
	savekmsg = ZTWO_VADDR(CHIP_PHYSADDR + amiga_chip_size);
	savekmsg->magic1 = SAVEKMSG_MAGIC1;
	savekmsg->magic2 = SAVEKMSG_MAGIC2;
	savekmsg->magicptr = ZTWO_PADDR(savekmsg);
	savekmsg->size = 0;

	registered = !!amiga_console_driver.write;
	amiga_console_driver.write = amiga_mem_console_write;
	if (!registered)
		register_console(&amiga_console_driver);
	return 0;
}
@@ -707,11 +723,16 @@ void amiga_serial_gets(struct console *co, char *s, int len)

static int __init amiga_debug_setup(char *arg)
{
	if (MACH_IS_AMIGA && !strcmp(arg, "ser")) {
	bool registered;

	if (!MACH_IS_AMIGA || strcmp(arg, "ser"))
		return 0;

	/* no initialization required (?) */
	registered = !!amiga_console_driver.write;
	amiga_console_driver.write = amiga_serial_console_write;
	if (!registered)
		register_console(&amiga_console_driver);
	}
	return 0;
}

+6 −3
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@

#include <asm/amigahw.h>
#include <asm/amigayle.h>
#include <asm/byteorder.h>


#ifdef CONFIG_ZORRO
@@ -66,10 +67,12 @@ static int __init z_dev_present(zorro_id id)
{
	unsigned int i;

	for (i = 0; i < zorro_num_autocon; i++)
		if (zorro_autocon[i].rom.er_Manufacturer == ZORRO_MANUF(id) &&
		    zorro_autocon[i].rom.er_Product == ZORRO_PROD(id))
	for (i = 0; i < zorro_num_autocon; i++) {
		const struct ExpansionRom *rom = &zorro_autocon_init[i].rom;
		if (be16_to_cpu(rom->er_Manufacturer) == ZORRO_MANUF(id) &&
		    rom->er_Product == ZORRO_PROD(id))
			return 1;
	}

	return 0;
}
Loading