diff options
| author | Wolfgang Denk <wd@denx.de> | 2011-12-02 00:17:49 +0100 | 
|---|---|---|
| committer | Wolfgang Denk <wd@denx.de> | 2011-12-02 00:17:49 +0100 | 
| commit | 7708d8b352e9e595f6f08afd3206af6495c7dc09 (patch) | |
| tree | fb9811040b2b1f55c44fc7274473f2ef0847c19b /arch/x86/cpu/interrupts.c | |
| parent | d887ad54ca74063338bc3108beed0aa4f15d1f6b (diff) | |
| parent | f008b17f8c2995996b5d100b71f8851d6f74a136 (diff) | |
| download | olio-uboot-2014.01-7708d8b352e9e595f6f08afd3206af6495c7dc09.tar.xz olio-uboot-2014.01-7708d8b352e9e595f6f08afd3206af6495c7dc09.zip | |
Merge branch 'master' of ssh://gemini/home/wd/git/u-boot/master
* 'master' of ssh://gemini/home/wd/git/u-boot/master:
  board/emk/top860/top860.c: Fix GCC 4.6 build warning
  board/sbc405/strataflash.c: Fix GCC 4.6 build warning
  arch/powerpc/cpu/mpc86xx/cpu.c: Fix GCC 4.6 build warning
  board/freescale/mpc8610hpcd/mpc8610hpcd.c: Fix GCC 4.6 build warning
  board/mpl/common/flash.c: Fix GCC 4.6 build warning
  post/board/lwmon5/gdc.c: Fix GCC 4.6 build warning
  drivers/usb/host/sl811-hcd.c: Fix GCC 4.6 build warning
  board/sandburst/common/flash.c: Fix GCC 4.6 build warning
  DB64460: Fix GCC 4.6 build warnings
  DB64360: Fix GCC 4.6 build warnings
  board/cray/L1/flash.c: Fix GCC 4.6 build warning
  drivers/block/sata_dwc.c: Fix GCC 4.6 build warning
  board/amirix/ap1000/flash.c: Fix GCC 4.6 build warning
  alpr board: Fix GCC 4.6 build warnings
  image: Don't detect XIP images as overlapping.
  image: Implement IH_TYPE_KERNEL_NOLOAD
  ppc4xx: Add Io64 board support
  ppc4xx: fix PMC440 painit command
  ppc4xx: remove invalid access to PCI_BRDGOPT2 register
  ppc4xx: use CONFIG_PCI_BOOTDELAY instead of private implementation
  mpc85xx: support for Freescale COM Express P2020
  arch/powerpc/cpu/mpc8xxx/ddr/interactive.c: Fix GCC 4.6 build warning
  mpc85xx: support board-specific reset function
  powerpc/85xx: verify the localbus device tree address before booting the OS
  mpc8xxx: update module_type values from JEDEC DDR3 SPD Specification
  powerpc/p3060qds: Add board related support for P3060QDS platform
  powerpc/85xx: clean up and document the QE/FMAN microcode macros
  powerpc/85xx: always implement the work-around for Erratum SATA_A001
  powerpc/85xx: CONFIG_FSL_SATA_V2 should be defined in config_mpc85xx.h
  powerpc/85xx: Add workaround for erratum A-003474
  powerpc/85xx: fixup flexcan device tree clock-frequency
  powerpc/85xx: Add workaround for erratum CPU-A003999
  x86: Fix some bugs in the i8402 driver when no controller is present
  x86: Make the i8042 driver checkpatch clean
  x86: Wrap small helper functions from libgcc to avoid an ABI mismatch
  x86: Import the glibc memset implementation
  x86: Fix a few recently added bugs
  x86: Don't relocate symbols which point to things that aren't relocated
  x86: Fix how the location of the realmode and bios blobs are calculated
  x86: Misc cleanups
  x86: Misc PCI touchups
  x86: Ensure IDT and GDT remain 16-byte aligned post relocation
  x86: Provide more configuration granularity
  x86: Add multiboot header
  sc520: Create arch asm-offsets
  x86: Punt cold- and warm-boot flags
  cosmetic: checkpatch cleanup of board/eNET/*.c
  cosmetic: checkpatch cleanup of arch/x86/lib/*.c
  cosmetic: checkpatch cleanup of arch/x86/cpu/sc520/*.c
  cosmetic: checkpatch cleanup of arch/x86/cpu/*.c
  x86: Call hang() on unrecoverable exception
  menu.c: use puts() instead of printf() where possible
  MAKEALL: drop obsolete mx31pdk_nand target
  dataflash: fix parameters order in write_dataflash()
  hawkboard: Replace HAWKBOARD_KICK{0, 1}_UNLOCK defines
  davinci_sonata: define CONFIG_MACH_TYPE for davinci_sonata board
  davinci_schmoogie: define CONFIG_MACH_TYPE for davinci_schmoogie board
  arm: a320evb: define mach-type in board config file
  OMAP3: Use sdelay from arch/arm/cpu/armv7/syslib.c instead of cloning that.
  Fix Stelian's email address
  DIU: 1080P and 720P support
  CFB: Fix font rendering on mx5 framebuffer
Diffstat (limited to 'arch/x86/cpu/interrupts.c')
| -rw-r--r-- | arch/x86/cpu/interrupts.c | 53 | 
1 files changed, 30 insertions, 23 deletions
| diff --git a/arch/x86/cpu/interrupts.c b/arch/x86/cpu/interrupts.c index c6e72eaa6..e0958eb67 100644 --- a/arch/x86/cpu/interrupts.c +++ b/arch/x86/cpu/interrupts.c @@ -31,6 +31,7 @@  #include <asm/interrupt.h>  #include <asm/io.h>  #include <asm/processor-flags.h> +#include <linux/compiler.h>  #define DECLARE_INTERRUPT(x) \  	".globl irq_"#x"\n" \ @@ -83,22 +84,22 @@ static inline unsigned long get_debugreg(int regno)  	switch (regno) {  	case 0: -		asm("mov %%db0, %0" :"=r" (val)); +		asm("mov %%db0, %0" : "=r" (val));  		break;  	case 1: -		asm("mov %%db1, %0" :"=r" (val)); +		asm("mov %%db1, %0" : "=r" (val));  		break;  	case 2: -		asm("mov %%db2, %0" :"=r" (val)); +		asm("mov %%db2, %0" : "=r" (val));  		break;  	case 3: -		asm("mov %%db3, %0" :"=r" (val)); +		asm("mov %%db3, %0" : "=r" (val));  		break;  	case 6: -		asm("mov %%db6, %0" :"=r" (val)); +		asm("mov %%db6, %0" : "=r" (val));  		break;  	case 7: -		asm("mov %%db7, %0" :"=r" (val)); +		asm("mov %%db7, %0" : "=r" (val));  		break;  	default:  		val = 0; @@ -120,7 +121,8 @@ void dump_regs(struct irq_regs *regs)  	printf("ESI: %08lx EDI: %08lx EBP: %08lx ESP: %08lx\n",  		regs->esi, regs->edi, regs->ebp, regs->esp);  	printf(" DS: %04x ES: %04x FS: %04x GS: %04x SS: %04x\n", -	       (u16)regs->xds, (u16)regs->xes, (u16)regs->xfs, (u16)regs->xgs, (u16)regs->xss); +	       (u16)regs->xds, (u16)regs->xes, (u16)regs->xfs, +	       (u16)regs->xgs, (u16)regs->xss);  	cr0 = read_cr0();  	cr2 = read_cr2(); @@ -164,21 +166,21 @@ struct idt_entry {  	u8	res;  	u8	access;  	u16	base_high; -} __attribute__ ((packed)); +} __packed;  struct desc_ptr {  	unsigned short size;  	unsigned long address;  	unsigned short segment; -} __attribute__((packed)); +} __packed; -struct idt_entry idt[256]; +struct idt_entry idt[256] __attribute__((aligned(16)));  struct desc_ptr idt_ptr;  static inline void load_idt(const struct desc_ptr *dtr)  { -	asm volatile("cs lidt %0"::"m" (*dtr)); +	asm volatile("cs lidt %0" : : "m" (*dtr));  }  void set_vector(u8 intnum, void *routine) @@ -187,6 +189,11 @@ void set_vector(u8 intnum, void *routine)  	idt[intnum].base_low = (u16)((u32)(routine) & 0xffff);  } +/* + * Ideally these would be defined static to avoid a checkpatch warning, but + * the compiler cannot see them in the inline asm and complains that they + * aren't defined + */  void irq_0(void);  void irq_1(void); @@ -201,7 +208,7 @@ int cpu_init_interrupts(void)  	disable_interrupts();  	/* Setup the IDT */ -	for (i=0;i<256;i++) { +	for (i = 0; i < 256; i++) {  		idt[i].access = 0x8e;  		idt[i].res = 0;  		idt[i].selector = 0x10; @@ -238,7 +245,7 @@ int disable_interrupts(void)  	asm volatile ("pushfl ; popl %0 ; cli\n" : "=g" (flags) : ); -	return flags & X86_EFLAGS_IF; /* IE flags is bit 9 */ +	return flags & X86_EFLAGS_IF;  }  /* IRQ Low-Level Service Routine */ @@ -255,7 +262,7 @@ void irq_llsr(struct irq_regs *regs)  	case 0x00:  		printf("Divide Error (Division by zero)\n");  		dump_regs(regs); -		while(1); +		hang();  		break;  	case 0x01:  		printf("Debug Interrupt (Single step)\n"); @@ -272,32 +279,32 @@ void irq_llsr(struct irq_regs *regs)  	case 0x04:  		printf("Overflow\n");  		dump_regs(regs); -		while(1); +		hang();  		break;  	case 0x05:  		printf("BOUND Range Exceeded\n");  		dump_regs(regs); -		while(1); +		hang();  		break;  	case 0x06:  		printf("Invalid Opcode (UnDefined Opcode)\n");  		dump_regs(regs); -		while(1); +		hang();  		break;  	case 0x07:  		printf("Device Not Available (No Math Coprocessor)\n");  		dump_regs(regs); -		while(1); +		hang();  		break;  	case 0x08:  		printf("Double fault\n");  		dump_regs(regs); -		while(1); +		hang();  		break;  	case 0x09:  		printf("Co-processor segment overrun\n");  		dump_regs(regs); -		while(1); +		hang();  		break;  	case 0x0a:  		printf("Invalid TSS\n"); @@ -306,12 +313,12 @@ void irq_llsr(struct irq_regs *regs)  	case 0x0b:  		printf("Segment Not Present\n");  		dump_regs(regs); -		while(1); +		hang();  		break;  	case 0x0c:  		printf("Stack Segment Fault\n");  		dump_regs(regs); -		while(1); +		hang();  		break;  	case 0x0d:  		printf("General Protection\n"); @@ -320,7 +327,7 @@ void irq_llsr(struct irq_regs *regs)  	case 0x0e:  		printf("Page fault\n");  		dump_regs(regs); -		while(1); +		hang();  		break;  	case 0x0f:  		printf("Floating-Point Error (Math Fault)\n"); |