ioapic - missing volatiles
leads to a kernel panic when using clang and SMP reported by trd <trdempsey.201201@gmail.com>
This commit is contained in:
		
							parent
							
								
									1e399dd8bd
								
							
						
					
					
						commit
						5ab87a6c38
					
				| @ -178,14 +178,14 @@ static u32_t lapic_bus_freq[CONFIG_MAX_CPUS]; | |||||||
| 
 | 
 | ||||||
| static u32_t ioapic_read(u32_t ioa_base, u32_t reg) | static u32_t ioapic_read(u32_t ioa_base, u32_t reg) | ||||||
| { | { | ||||||
| 	*((u32_t *)(ioa_base + IOAPIC_IOREGSEL)) = (reg & 0xff); | 	*((volatile u32_t *)(ioa_base + IOAPIC_IOREGSEL)) = (reg & 0xff); | ||||||
| 	return *(u32_t *)(ioa_base + IOAPIC_IOWIN); | 	return *(volatile u32_t *)(ioa_base + IOAPIC_IOWIN); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void ioapic_write(u32_t ioa_base, u8_t reg, u32_t val) | static void ioapic_write(u32_t ioa_base, u8_t reg, u32_t val) | ||||||
| { | { | ||||||
| 	*((u32_t *)(ioa_base + IOAPIC_IOREGSEL)) = reg; | 	*((volatile u32_t *)(ioa_base + IOAPIC_IOREGSEL)) = reg; | ||||||
| 	*((u32_t *)(ioa_base + IOAPIC_IOWIN)) = val; | 	*((volatile u32_t *)(ioa_base + IOAPIC_IOWIN)) = val; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void lapic_microsec_sleep(unsigned count); | void lapic_microsec_sleep(unsigned count); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tomas Hruby
						Tomas Hruby