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

Commit dd6d1844 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (80 commits)
  [MIPS] tlbex.c: Cleanup __init usage.
  [MIPS] WRPPMC serial support move to platform device
  [MIPS] R1: Fix hazard barriers to make kernels work on R2 also.
  [MIPS] VPE: reimplement ELF loader.
  [MIPS] cleanup WRPPMC include files
  [MIPS] Add BUG_ON assertion for attempt to run kernel on the wrong CPU type.
  [MIPS] SMP: Use ISO C struct initializer for local structs.
  [MIPS] SMP: Kill useless casts.
  [MIPS] Kill num_online_cpus() loops.
  [MIPS] SMP: Implement smp_call_function_mask().
  [MIPS] Make facility to convert CPU types to strings generally available.
  [MIPS] Convert list of CPU types from #define to enum.
  [MIPS] Optimize get_unaligned / put_unaligned implementations.
  [MIPS] checkfiles: Fix "need space after that ','" errors.
  [MIPS] Fix "no space between function name and open parenthesis" warnings.
  [MIPS] Allow hardwiring of the CPU type to a single type for optimization.
  [MIPS] tlbex: Size optimize code by declaring a few functions inline.
  [MIPS] pg-r4k.c: Dump the generated code
  [MIPS] Cobalt: Remove cobalt_machine_power_off()
  [MIPS] Cobalt: Move reset port definition to arch/mips/cobalt/reset.c
  ...
parents 19f71153 aaf76a32
Loading
Loading
Loading
Loading
+81 −18
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ config MIPS
	default y
	# Horrible source of confusion.  Die, die, die ...
	select EMBEDDED
	select RTC_LIB

mainmenu "Linux/MIPS Kernel Configuration"

@@ -44,12 +45,30 @@ config BASLER_EXCITE_PROTOTYPE
	  note that a kernel built with this option selected will not be
	  able to run on normal units.

config BCM47XX
	bool "BCM47XX based boards"
	select DMA_NONCOHERENT
	select HW_HAS_PCI
	select IRQ_CPU
	select SYS_HAS_CPU_MIPS32_R1
	select SYS_SUPPORTS_32BIT_KERNEL
	select SYS_SUPPORTS_LITTLE_ENDIAN
	select SSB
	select SSB_DRIVER_MIPS
	select GENERIC_GPIO
	select SYS_HAS_EARLY_PRINTK
	select CFE
	help
	 Support for BCM47XX based boards

config MIPS_COBALT
	bool "Cobalt Server"
	select DMA_NONCOHERENT
	select HW_HAS_PCI
	select I8253
	select I8259
	select IRQ_CPU
	select IRQ_GT641XX
	select PCI_GT64XXX_PCI0
	select SYS_HAS_CPU_NEVADA
	select SYS_HAS_EARLY_PRINTK
@@ -93,6 +112,8 @@ config MACH_JAZZ
	select ARC32
	select ARCH_MAY_HAVE_PC_FDC
	select GENERIC_ISA_DMA
	select IRQ_CPU
	select I8253
	select I8259
	select ISA
	select PCSPEAKER
@@ -107,6 +128,20 @@ config MACH_JAZZ
	 Members include the Acer PICA, MIPS Magnum 4000, MIPS Millenium and
	 Olivetti M700-10 workstations.

config LASAT
	bool "LASAT Networks platforms"
	select DMA_NONCOHERENT
	select SYS_HAS_EARLY_PRINTK
	select HW_HAS_PCI
	select PCI_GT64XXX_PCI0
	select MIPS_NILE4
	select R5000_CPU_SCACHE
	select SYS_HAS_CPU_R5000
	select SYS_SUPPORTS_32BIT_KERNEL
	select SYS_SUPPORTS_64BIT_KERNEL if BROKEN
	select SYS_SUPPORTS_LITTLE_ENDIAN
	select GENERIC_HARDIRQS_NO__DO_IRQ

config LEMOTE_FULONG
	bool "Lemote Fulong mini-PC"
	select ARCH_SPARSEMEM_ENABLE
@@ -168,6 +203,7 @@ config MIPS_MALTA
	select GENERIC_ISA_DMA
	select IRQ_CPU
	select HW_HAS_PCI
	select I8253
	select I8259
	select MIPS_BOARDS_GEN
	select MIPS_BONITO64
@@ -301,7 +337,9 @@ config QEMU
	select DMA_COHERENT
	select GENERIC_ISA_DMA
	select HAVE_STD_PC_SERIAL_PORT
	select I8253
	select I8259
	select IRQ_CPU
	select ISA
	select PCSPEAKER
	select SWAP_IO_SPACE
@@ -328,6 +366,7 @@ config SGI_IP22
	select BOOT_ELF32
	select DMA_NONCOHERENT
	select HW_HAS_EISA
	select I8253
	select IP22_CPU_SCACHE
	select IRQ_CPU
	select GENERIC_ISA_DMA_SUPPORT_BROKEN
@@ -352,7 +391,6 @@ config SGI_IP27
	select SYS_HAS_EARLY_PRINTK
	select HW_HAS_PCI
	select NR_CPUS_DEFAULT_64
	select PCI_DOMAINS
	select SYS_HAS_CPU_R10000
	select SYS_SUPPORTS_64BIT_KERNEL
	select SYS_SUPPORTS_BIG_ENDIAN
@@ -484,7 +522,6 @@ config SIBYTE_BIGSUR
	select BOOT_ELF32
	select DMA_COHERENT
	select NR_CPUS_DEFAULT_4
	select PCI_DOMAINS
	select SIBYTE_BCM1x80
	select SWAP_IO_SPACE
	select SYS_HAS_CPU_SB1
@@ -502,6 +539,7 @@ config SNI_RM
	select HW_HAS_EISA
	select HW_HAS_PCI
	select IRQ_CPU
	select I8253
	select I8259
	select ISA
	select PCSPEAKER
@@ -599,6 +637,7 @@ endchoice

source "arch/mips/au1000/Kconfig"
source "arch/mips/jazz/Kconfig"
source "arch/mips/lasat/Kconfig"
source "arch/mips/pmc-sierra/Kconfig"
source "arch/mips/sgi-ip27/Kconfig"
source "arch/mips/sibyte/Kconfig"
@@ -635,10 +674,18 @@ config GENERIC_CALIBRATE_DELAY
	bool
	default y

config GENERIC_CLOCKEVENTS
	bool
	default y

config GENERIC_TIME
	bool
	default y

config GENERIC_CMOS_UPDATE
	bool
	default y

config SCHED_NO_NO_OMIT_FRAME_POINTER
	bool
	default y
@@ -659,6 +706,9 @@ config ARCH_MAY_HAVE_PC_FDC
config BOOT_RAW
	bool

config CFE
	bool

config DMA_COHERENT
	bool

@@ -706,6 +756,9 @@ config MIPS_BONITO64
config MIPS_MSC
	bool

config MIPS_NILE4
	bool

config MIPS_DISABLE_OBSOLETE_IDE
	bool

@@ -775,6 +828,9 @@ config IRQ_MSP_CIC
config IRQ_TXX9
	bool

config IRQ_GT641XX
	bool

config MIPS_BOARDS_GEN
	bool

@@ -856,6 +912,8 @@ config BOOT_ELF64

menu "CPU selection"

source "kernel/time/Kconfig"

choice
	prompt "CPU type"
	default CPU_R4X00
@@ -1316,6 +1374,7 @@ config MIPS_MT_SMTC
	depends on CPU_MIPS32_R2
	#depends on CPU_MIPS64_R2		# once there is hardware ...
	depends on SYS_SUPPORTS_MULTITHREADING
	select GENERIC_CLOCKEVENTS_BROADCAST
	select CPU_MIPSR2_IRQ_VI
	select CPU_MIPSR2_IRQ_EI
	select CPU_MIPSR2_SRS
@@ -1378,6 +1437,19 @@ config MIPS_MT_SMTC_IM_BACKSTOP
	  impact on interrupt service overhead. Disable it only if you know
	  what you are doing.

config MIPS_MT_SMTC_IRQAFF
	bool "Support IRQ affinity API"
	depends on MIPS_MT_SMTC
	default n
	help
	  Enables SMP IRQ affinity API (/proc/irq/*/smp_affinity, etc.)
	  for SMTC Linux kernel. Requires platform support, of which
	  an example can be found in the MIPS kernel i8259 and Malta
	  platform code.  It is recommended that MIPS_MT_SMTC_INSTANT_REPLAY
	  be enabled if MIPS_MT_SMTC_IRQAFF is used. Adds overhead to
	  interrupt dispatch, and should be used only if you know what
	  you are doing.

config MIPS_VPE_LOADER_TOM
	bool "Load VPE program into memory hidden from linux"
	depends on MIPS_VPE_LOADER
@@ -1472,6 +1544,9 @@ config CPU_HAS_SYNC
	depends on !CPU_R3000
	default y

config GENERIC_CLOCKEVENTS_BROADCAST
	bool

#
# Use the generic interrupt handling code in kernel/irq/:
#
@@ -1762,6 +1837,7 @@ config HW_HAS_PCI
config PCI
	bool "Support for PCI controller"
	depends on HW_HAS_PCI
	select PCI_DOMAINS
	help
	  Find out whether you have a PCI motherboard. PCI is the name of a
	  bus system, i.e. the way the CPU talks to the other stuff inside
@@ -1775,7 +1851,6 @@ config PCI

config PCI_DOMAINS
	bool
	depends on PCI

source "drivers/pci/Kconfig"

@@ -1824,6 +1899,9 @@ config MMU
	bool
	default y

config I8253
	bool

config PCSPEAKER
	bool

@@ -1840,21 +1918,6 @@ source "fs/Kconfig.binfmt"
config TRAD_SIGNALS
	bool

config BUILD_ELF64
	bool "Use 64-bit ELF format for building"
	depends on 64BIT
	help
	  A 64-bit kernel is usually built using the 64-bit ELF binary object
	  format as it's one that allows arbitrary 64-bit constructs.  For
	  kernels that are loaded within the KSEG compatibility segments the
	  32-bit ELF format can optionally be used resulting in a somewhat
	  smaller binary, but this option is not explicitly supported by the
	  toolchain and since binutils 2.14 it does not even work at all.

	  Say Y to use the 64-bit format or N to use the 32-bit one.

	  If unsure say Y.

config BINFMT_IRIX
	bool "Include IRIX binary compatibility"
	depends on CPU_BIG_ENDIAN && 32BIT && BROKEN
+42 −6
Original line number Diff line number Diff line
@@ -60,11 +60,6 @@ vmlinux-32 = vmlinux.32
vmlinux-64		= vmlinux

cflags-y		+= -mabi=64
ifdef CONFIG_BUILD_ELF64
cflags-y		+= $(call cc-option,-mno-explicit-relocs)
else
cflags-y		+= $(call cc-option,-msym32)
endif
endif

all-$(CONFIG_BOOT_ELF32)	:= $(vmlinux-32)
@@ -153,7 +148,8 @@ endif
#
# Firmware support
#
libs-$(CONFIG_ARC)		+= arch/mips/arc/
libs-$(CONFIG_ARC)		+= arch/mips/fw/arc/
libs-$(CONFIG_CFE)		+= arch/mips/fw/cfe/
libs-$(CONFIG_SIBYTE_CFE)	+= arch/mips/sibyte/cfe/

#
@@ -366,6 +362,13 @@ core-$(CONFIG_BASLER_EXCITE) += arch/mips/basler/excite/
cflags-$(CONFIG_BASLER_EXCITE)	+= -Iinclude/asm-mips/mach-excite
load-$(CONFIG_BASLER_EXCITE)	+= 0x80100000

#
# LASAT platforms
#
core-$(CONFIG_LASAT)		+= arch/mips/lasat/
cflags-$(CONFIG_LASAT)		+= -Iinclude/asm-mips/mach-lasat
load-$(CONFIG_LASAT)		+= 0xffffffff80000000

#
# Common VR41xx
#
@@ -532,6 +535,13 @@ load-$(CONFIG_SIBYTE_SWARM) := 0xffffffff80100000
libs-$(CONFIG_SIBYTE_BIGSUR)	+= arch/mips/sibyte/swarm/
load-$(CONFIG_SIBYTE_BIGSUR)	:= 0xffffffff80100000

#
# Broadcom BCM47XX boards
#
core-$(CONFIG_BCM47XX)		+= arch/mips/bcm47xx/
cflags-$(CONFIG_BCM47XX)	+= -Iinclude/asm-mips/mach-bcm47xx
load-$(CONFIG_BCM47XX)		:= 0xffffffff80001000

#
# SNI RM
#
@@ -578,6 +588,26 @@ else
JIFFIES			= jiffies_64
endif

#
# Automatically detect the build format. By default we choose
# the elf format according to the load address.
# We can always force a build with a 64-bits symbol format by
# passing 'KBUILD_SYM32=no' option to the make's command line.
#
ifdef CONFIG_64BIT
  ifndef KBUILD_SYM32
    ifeq ($(shell expr $(load-y) \< 0xffffffff80000000), 0)
      KBUILD_SYM32 = y
    endif
  endif

  ifeq ($(KBUILD_SYM32), y)
    ifeq ($(call cc-option-yn,-msym32), y)
      cflags-y += -msym32 -DKBUILD_64BIT_SYM32
    endif
  endif
endif

AFLAGS		+= $(cflags-y)
CFLAGS		+= $(cflags-y) \
			-D"VMLINUX_LOAD_ADDRESS=$(load-y)"
@@ -615,6 +645,11 @@ core-y += arch/mips/kernel/ arch/mips/mm/ arch/mips/math-emu/

drivers-$(CONFIG_OPROFILE)	+= arch/mips/oprofile/

ifdef CONFIG_LASAT
rom.bin rom.sw: vmlinux
	$(Q)$(MAKE) $(build)=arch/mips/lasat/image $@
endif

#
# Some machines like the Indy need 32-bit ELF binaries for booting purposes.
# Other need ECOFF, so we build a 32-bit ELF binary for them which we then
@@ -658,6 +693,7 @@ endif

archclean:
	@$(MAKE) $(clean)=arch/mips/boot
	@$(MAKE) $(clean)=arch/mips/lasat

define archhelp
	echo '  vmlinux.ecoff        - ECOFF boot image'
+1 −14
Original line number Diff line number Diff line
@@ -65,19 +65,6 @@
#define EXT_INTC1_REQ1 5 /* IP 5 */
#define MIPS_TIMER_IP  7 /* IP 7 */

extern void set_debug_traps(void);
extern irq_cpustat_t irq_stat [NR_CPUS];
extern void mips_timer_interrupt(void);

static void setup_local_irq(unsigned int irq, int type, int int_req);
static void end_irq(unsigned int irq_nr);
static inline void mask_and_ack_level_irq(unsigned int irq_nr);
static inline void mask_and_ack_rise_edge_irq(unsigned int irq_nr);
static inline void mask_and_ack_fall_edge_irq(unsigned int irq_nr);
static inline void mask_and_ack_either_edge_irq(unsigned int irq_nr);
inline void local_enable_irq(unsigned int irq_nr);
inline void local_disable_irq(unsigned int irq_nr);

void	(*board_init_irq)(void);

static DEFINE_SPINLOCK(irq_lock);
@@ -646,7 +633,7 @@ asmlinkage void plat_irq_dispatch(void)
	unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;

	if (pending & CAUSEF_IP7)
		mips_timer_interrupt();
		do_IRQ(63);
	else if (pending & CAUSEF_IP2)
		intc0_req0_irqdispatch();
	else if (pending & CAUSEF_IP3)
+0 −2
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@ extern void au1000_halt(void);
extern void au1000_power_off(void);
extern void au1x_time_init(void);
extern void au1x_timer_setup(struct irqaction *irq);
extern void au1xxx_time_init(void);
extern void set_cpuspec(void);

void __init plat_mem_setup(void)
@@ -112,7 +111,6 @@ void __init plat_mem_setup(void)
	_machine_restart = au1000_restart;
	_machine_halt = au1000_halt;
	pm_power_off = au1000_power_off;
	board_time_init = au1xxx_time_init;

	/* IO/MEM resources. */
	set_io_port_base(0);
+1 −45
Original line number Diff line number Diff line
@@ -64,48 +64,8 @@ static unsigned long last_pc0, last_match20;

static DEFINE_SPINLOCK(time_lock);

static inline void ack_r4ktimer(unsigned long newval)
{
	write_c0_compare(newval);
}

/*
 * There are a lot of conceptually broken versions of the MIPS timer interrupt
 * handler floating around.  This one is rather different, but the algorithm
 * is provably more robust.
 */
unsigned long wtimer;

void mips_timer_interrupt(void)
{
	int irq = 63;

	irq_enter();
	kstat_this_cpu.irqs[irq]++;

	if (r4k_offset == 0)
		goto null;

	do {
		kstat_this_cpu.irqs[irq]++;
		do_timer(1);
#ifndef CONFIG_SMP
		update_process_times(user_mode(get_irq_regs()));
#endif
		r4k_cur += r4k_offset;
		ack_r4ktimer(r4k_cur);

	} while (((unsigned long)read_c0_count()
	         - r4k_cur) < 0x7fffffff);

	irq_exit();
	return;

null:
	ack_r4ktimer(0);
	irq_exit();
}

#ifdef CONFIG_PM
irqreturn_t counter0_irq(int irq, void *dev_id)
{
@@ -329,7 +289,3 @@ void __init plat_timer_setup(struct irqaction *irq)

#endif
}

void __init au1xxx_time_init(void)
{
}
Loading