summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2011-04-15 10:44:06 -0700
committerNathan Binkert <nate@binkert.org>2011-04-15 10:44:06 -0700
commit39a055645f77e0fa7bf49406635dba6bd65e361f (patch)
treea7df44358c75ff2de6e6f1549755f72cddb7d735 /src
parent50fda09ac79b2dc1aa31fbced8d19b23d683fbab (diff)
downloadgem5-39a055645f77e0fa7bf49406635dba6bd65e361f.tar.xz
includes: sort all includes
Diffstat (limited to 'src')
-rw-r--r--src/arch/alpha/faults.cc6
-rw-r--r--src/arch/alpha/isa.hh5
-rw-r--r--src/arch/alpha/isa/main.isa12
-rw-r--r--src/arch/alpha/linux/system.cc8
-rw-r--r--src/arch/alpha/mt.hh6
-rw-r--r--src/arch/alpha/process.cc2
-rw-r--r--src/arch/alpha/remote_gdb.cc4
-rw-r--r--src/arch/alpha/remote_gdb.hh6
-rw-r--r--src/arch/alpha/tlb.cc2
-rw-r--r--src/arch/alpha/tru64/process.cc2
-rw-r--r--src/arch/alpha/types.hh2
-rw-r--r--src/arch/alpha/utility.hh2
-rw-r--r--src/arch/arm/faults.cc4
-rw-r--r--src/arch/arm/faults.hh2
-rw-r--r--src/arch/arm/insts/macromem.cc3
-rw-r--r--src/arch/arm/insts/static_inst.cc4
-rw-r--r--src/arch/arm/insts/vfp.hh6
-rw-r--r--src/arch/arm/intregs.hh2
-rw-r--r--src/arch/arm/isa/includes.isa8
-rw-r--r--src/arch/arm/linux/atag.hh1
-rw-r--r--src/arch/arm/linux/linux.cc4
-rw-r--r--src/arch/arm/linux/process.cc2
-rw-r--r--src/arch/arm/linux/process.hh1
-rw-r--r--src/arch/arm/linux/system.cc2
-rw-r--r--src/arch/arm/locked_mem.hh1
-rw-r--r--src/arch/arm/pagetable.hh1
-rw-r--r--src/arch/arm/predecoder.hh2
-rw-r--r--src/arch/arm/process.hh1
-rw-r--r--src/arch/arm/registers.hh2
-rw-r--r--src/arch/arm/remote_gdb.cc10
-rw-r--r--src/arch/arm/system.cc3
-rw-r--r--src/arch/arm/system.hh2
-rw-r--r--src/arch/arm/table_walker.cc2
-rw-r--r--src/arch/arm/table_walker.hh1
-rw-r--r--src/arch/arm/tlb.hh2
-rw-r--r--src/arch/arm/vtophys.hh1
-rw-r--r--src/arch/generic/debugfaults.hh4
-rw-r--r--src/arch/generic/types.hh2
-rwxr-xr-xsrc/arch/mips/dsp.cc6
-rwxr-xr-xsrc/arch/mips/dsp.hh2
-rw-r--r--src/arch/mips/isa.cc2
-rw-r--r--src/arch/mips/isa.hh2
-rw-r--r--src/arch/mips/isa/includes.isa37
-rw-r--r--src/arch/mips/isa_traits.hh2
-rw-r--r--src/arch/mips/linux/linux.cc4
-rw-r--r--src/arch/mips/linux/process.cc4
-rw-r--r--src/arch/mips/linux/process.hh2
-rw-r--r--src/arch/mips/linux/system.cc8
-rwxr-xr-xsrc/arch/mips/mt.hh6
-rw-r--r--src/arch/mips/process.cc2
-rw-r--r--src/arch/mips/process.hh1
-rwxr-xr-xsrc/arch/mips/system.cc3
-rwxr-xr-xsrc/arch/mips/system.hh4
-rw-r--r--src/arch/mips/tlb.cc6
-rw-r--r--src/arch/mips/tlb.hh4
-rw-r--r--src/arch/mips/utility.cc6
-rw-r--r--src/arch/mips/utility.hh3
-rw-r--r--src/arch/mips/vtophys.hh1
-rw-r--r--src/arch/power/insts/floating.hh2
-rw-r--r--src/arch/power/insts/integer.hh2
-rw-r--r--src/arch/power/isa/includes.isa16
-rw-r--r--src/arch/power/linux/linux.cc4
-rw-r--r--src/arch/power/linux/process.cc2
-rw-r--r--src/arch/power/linux/process.hh1
-rw-r--r--src/arch/power/process.hh1
-rw-r--r--src/arch/power/tlb.hh2
-rw-r--r--src/arch/power/vtophys.hh1
-rw-r--r--src/arch/sparc/isa.hh6
-rw-r--r--src/arch/sparc/isa/includes.isa14
-rw-r--r--src/arch/sparc/isa_traits.hh2
-rw-r--r--src/arch/sparc/linux/linux.cc3
-rw-r--r--src/arch/sparc/linux/process.cc4
-rw-r--r--src/arch/sparc/locked_mem.hh1
-rw-r--r--src/arch/sparc/mmapped_ipr.hh3
-rw-r--r--src/arch/sparc/nativetrace.cc2
-rw-r--r--src/arch/sparc/process.cc6
-rw-r--r--src/arch/sparc/process.hh1
-rw-r--r--src/arch/sparc/remote_gdb.cc6
-rw-r--r--src/arch/sparc/remote_gdb.hh2
-rw-r--r--src/arch/sparc/solaris/process.cc4
-rw-r--r--src/arch/sparc/solaris/solaris.cc4
-rw-r--r--src/arch/sparc/system.cc1
-rw-r--r--src/arch/sparc/tlb.cc2
-rw-r--r--src/arch/sparc/tlb_map.hh3
-rw-r--r--src/arch/sparc/types.hh2
-rw-r--r--src/arch/sparc/utility.hh2
-rw-r--r--src/arch/sparc/vtophys.cc4
-rw-r--r--src/arch/x86/bios/acpi.cc8
-rw-r--r--src/arch/x86/bios/intelmp.hh3
-rw-r--r--src/arch/x86/emulenv.hh2
-rw-r--r--src/arch/x86/faults.hh4
-rw-r--r--src/arch/x86/insts/badmicroop.cc2
-rw-r--r--src/arch/x86/insts/macroop.hh4
-rw-r--r--src/arch/x86/insts/microfpop.cc3
-rw-r--r--src/arch/x86/insts/microldstop.cc3
-rw-r--r--src/arch/x86/insts/micromediaop.cc3
-rw-r--r--src/arch/x86/interrupts.cc2
-rw-r--r--src/arch/x86/interrupts.hh4
-rw-r--r--src/arch/x86/isa.hh8
-rw-r--r--src/arch/x86/isa/includes.isa16
-rw-r--r--src/arch/x86/linux/linux.cc3
-rw-r--r--src/arch/x86/linux/process.cc4
-rw-r--r--src/arch/x86/linux/process.hh2
-rw-r--r--src/arch/x86/linux/syscalls.cc2
-rw-r--r--src/arch/x86/linux/system.cc3
-rw-r--r--src/arch/x86/linux/system.hh2
-rw-r--r--src/arch/x86/microcode_rom.hh2
-rw-r--r--src/arch/x86/nativetrace.cc4
-rw-r--r--src/arch/x86/pagetable_walker.cc2
-rw-r--r--src/arch/x86/pagetable_walker.hh2
-rw-r--r--src/arch/x86/predecoder.hh2
-rw-r--r--src/arch/x86/process.cc6
-rw-r--r--src/arch/x86/process.hh1
-rw-r--r--src/arch/x86/registers.hh2
-rw-r--r--src/arch/x86/remote_gdb.cc4
-rw-r--r--src/arch/x86/system.cc7
-rw-r--r--src/arch/x86/tlb.cc8
-rw-r--r--src/arch/x86/tlb.hh6
-rw-r--r--src/base/cp_annotate.cc6
-rw-r--r--src/base/cp_annotate.hh6
-rw-r--r--src/base/cprintf.hh2
-rw-r--r--src/base/debug.cc3
-rw-r--r--src/base/fast_alloc.hh4
-rw-r--r--src/base/fenv.c2
-rw-r--r--src/base/hostinfo.cc8
-rw-r--r--src/base/inet.hh1
-rw-r--r--src/base/inifile.cc2
-rw-r--r--src/base/loader/aout_object.cc2
-rw-r--r--src/base/loader/elf_object.cc5
-rw-r--r--src/base/loader/elf_object.hh3
-rwxr-xr-xsrc/base/loader/hex_file.cc2
-rw-r--r--src/base/loader/object_file.cc18
-rw-r--r--src/base/loader/symtab.cc2
-rw-r--r--src/base/misc.cc3
-rw-r--r--src/base/mysql.hh7
-rw-r--r--src/base/output.cc6
-rw-r--r--src/base/pollevent.cc3
-rw-r--r--src/base/pollevent.hh4
-rw-r--r--src/base/range_map.hh4
-rw-r--r--src/base/remote_gdb.cc4
-rw-r--r--src/base/remote_gdb.hh5
-rw-r--r--src/base/socket.cc11
-rw-r--r--src/base/statistics.cc2
-rw-r--r--src/base/statistics.hh8
-rw-r--r--src/base/stats/info.hh2
-rw-r--r--src/base/stats/mysql.cc6
-rw-r--r--src/base/stats/output.cc2
-rw-r--r--src/base/stats/text.cc12
-rw-r--r--src/base/stats/text.hh2
-rw-r--r--src/base/str.hh3
-rw-r--r--src/base/time.hh1
-rw-r--r--src/base/trace.cc2
-rw-r--r--src/base/vnc/convert.cc2
-rw-r--r--src/base/vnc/vncserver.cc8
-rw-r--r--src/base/vnc/vncserver.hh4
-rw-r--r--src/cpu/activity.cc2
-rw-r--r--src/cpu/activity.hh2
-rw-r--r--src/cpu/base.cc8
-rw-r--r--src/cpu/base.hh2
-rw-r--r--src/cpu/base_dyn_inst_impl.hh2
-rw-r--r--src/cpu/checker/cpu.cc2
-rw-r--r--src/cpu/checker/cpu.hh4
-rw-r--r--src/cpu/checker/cpu_impl.hh4
-rw-r--r--src/cpu/cpuevent.hh1
-rw-r--r--src/cpu/exetrace.cc2
-rw-r--r--src/cpu/func_unit.hh2
-rw-r--r--src/cpu/inorder/cpu.cc8
-rw-r--r--src/cpu/inorder/cpu.hh14
-rw-r--r--src/cpu/inorder/first_stage.cc4
-rw-r--r--src/cpu/inorder/first_stage.hh6
-rw-r--r--src/cpu/inorder/inorder_cpu_builder.cc6
-rw-r--r--src/cpu/inorder/inorder_dyn_inst.cc4
-rw-r--r--src/cpu/inorder/inorder_dyn_inst.hh2
-rw-r--r--src/cpu/inorder/inorder_trace.cc4
-rw-r--r--src/cpu/inorder/pipeline_stage.cc2
-rw-r--r--src/cpu/inorder/pipeline_stage.hh6
-rw-r--r--src/cpu/inorder/pipeline_traits.5stage.cc4
-rw-r--r--src/cpu/inorder/pipeline_traits.5stage.hh1
-rw-r--r--src/cpu/inorder/pipeline_traits.9stage.cc4
-rw-r--r--src/cpu/inorder/pipeline_traits.9stage.hh3
-rw-r--r--src/cpu/inorder/pipeline_traits.9stage.smt2.cc4
-rw-r--r--src/cpu/inorder/pipeline_traits.9stage.smt2.hh3
-rw-r--r--src/cpu/inorder/pipeline_traits.hh1
-rw-r--r--src/cpu/inorder/reg_dep_map.cc4
-rw-r--r--src/cpu/inorder/resource.cc4
-rw-r--r--src/cpu/inorder/resource.hh4
-rw-r--r--src/cpu/inorder/resource_pool.9stage.cc8
-rw-r--r--src/cpu/inorder/resource_pool.cc8
-rw-r--r--src/cpu/inorder/resource_pool.hh10
-rw-r--r--src/cpu/inorder/resource_sked.cc10
-rw-r--r--src/cpu/inorder/resource_sked.hh4
-rw-r--r--src/cpu/inorder/resources/agen_unit.hh8
-rw-r--r--src/cpu/inorder/resources/bpred_unit.hh2
-rw-r--r--src/cpu/inorder/resources/branch_predictor.hh8
-rw-r--r--src/cpu/inorder/resources/cache_unit.cc6
-rw-r--r--src/cpu/inorder/resources/cache_unit.hh2
-rw-r--r--src/cpu/inorder/resources/decode_unit.hh6
-rw-r--r--src/cpu/inorder/resources/execution_unit.cc5
-rw-r--r--src/cpu/inorder/resources/execution_unit.hh6
-rw-r--r--src/cpu/inorder/resources/fetch_seq_unit.hh6
-rw-r--r--src/cpu/inorder/resources/fetch_unit.cc6
-rw-r--r--src/cpu/inorder/resources/fetch_unit.hh4
-rw-r--r--src/cpu/inorder/resources/graduation_unit.hh6
-rw-r--r--src/cpu/inorder/resources/inst_buffer.cc4
-rw-r--r--src/cpu/inorder/resources/inst_buffer.hh6
-rw-r--r--src/cpu/inorder/resources/mem_dep_unit.hh6
-rw-r--r--src/cpu/inorder/resources/mult_div_unit.cc5
-rw-r--r--src/cpu/inorder/resources/mult_div_unit.hh8
-rw-r--r--src/cpu/inorder/resources/resource_list.hh16
-rw-r--r--src/cpu/inorder/resources/tlb_unit.cc6
-rw-r--r--src/cpu/inorder/resources/tlb_unit.hh4
-rw-r--r--src/cpu/inorder/resources/use_def.cc4
-rw-r--r--src/cpu/inorder/resources/use_def.hh6
-rw-r--r--src/cpu/inorder/thread_context.cc2
-rw-r--r--src/cpu/inorder/thread_context.hh4
-rw-r--r--src/cpu/inorder/thread_state.cc4
-rw-r--r--src/cpu/intr_control.cc2
-rw-r--r--src/cpu/intr_control.hh2
-rw-r--r--src/cpu/nativetrace.hh3
-rw-r--r--src/cpu/o3/base_dyn_inst.cc2
-rw-r--r--src/cpu/o3/bpred_unit.hh2
-rw-r--r--src/cpu/o3/bpred_unit_impl.hh2
-rw-r--r--src/cpu/o3/checker_builder.cc2
-rw-r--r--src/cpu/o3/commit.cc2
-rw-r--r--src/cpu/o3/commit.hh2
-rw-r--r--src/cpu/o3/commit_impl.hh6
-rw-r--r--src/cpu/o3/cpu.cc6
-rw-r--r--src/cpu/o3/cpu.hh11
-rw-r--r--src/cpu/o3/cpu_policy.hh14
-rw-r--r--src/cpu/o3/decode.cc2
-rw-r--r--src/cpu/o3/dyn_inst.hh4
-rw-r--r--src/cpu/o3/fetch.cc2
-rw-r--r--src/cpu/o3/fetch.hh4
-rw-r--r--src/cpu/o3/fetch_impl.hh2
-rw-r--r--src/cpu/o3/free_list.cc1
-rw-r--r--src/cpu/o3/fu_pool.hh2
-rw-r--r--src/cpu/o3/iew.cc2
-rw-r--r--src/cpu/o3/iew.hh4
-rw-r--r--src/cpu/o3/iew_impl.hh2
-rw-r--r--src/cpu/o3/impl.hh1
-rw-r--r--src/cpu/o3/inst_queue.cc2
-rw-r--r--src/cpu/o3/inst_queue.hh4
-rwxr-xr-xsrc/cpu/o3/isa_specific.hh5
-rw-r--r--src/cpu/o3/lsq.hh2
-rw-r--r--src/cpu/o3/lsq_unit.hh4
-rw-r--r--src/cpu/o3/lsq_unit_impl.hh2
-rw-r--r--src/cpu/o3/mem_dep_unit.cc2
-rw-r--r--src/cpu/o3/rename.hh2
-rw-r--r--src/cpu/o3/scoreboard.hh1
-rwxr-xr-xsrc/cpu/o3/thread_context.cc2
-rwxr-xr-xsrc/cpu/o3/thread_context.hh2
-rw-r--r--src/cpu/ozone/back_end.hh6
-rw-r--r--src/cpu/ozone/back_end_impl.hh2
-rw-r--r--src/cpu/ozone/base_dyn_inst.cc2
-rw-r--r--src/cpu/ozone/checker_builder.cc2
-rw-r--r--src/cpu/ozone/cpu.hh8
-rw-r--r--src/cpu/ozone/cpu_builder.cc2
-rw-r--r--src/cpu/ozone/cpu_impl.hh15
-rw-r--r--src/cpu/ozone/dyn_inst.hh10
-rw-r--r--src/cpu/ozone/dyn_inst_impl.hh2
-rw-r--r--src/cpu/ozone/ea_list.cc2
-rw-r--r--src/cpu/ozone/front_end.hh4
-rw-r--r--src/cpu/ozone/front_end_impl.hh6
-rw-r--r--src/cpu/ozone/inorder_back_end.hh8
-rw-r--r--src/cpu/ozone/inorder_back_end_impl.hh2
-rw-r--r--src/cpu/ozone/inst_queue.cc2
-rw-r--r--src/cpu/ozone/inst_queue.hh2
-rw-r--r--src/cpu/ozone/inst_queue_impl.hh3
-rw-r--r--src/cpu/ozone/lsq_unit.cc2
-rw-r--r--src/cpu/ozone/lsq_unit.hh4
-rw-r--r--src/cpu/ozone/lw_back_end.hh6
-rw-r--r--src/cpu/ozone/lw_lsq.cc2
-rw-r--r--src/cpu/ozone/lw_lsq.hh6
-rw-r--r--src/cpu/ozone/lw_lsq_impl.hh2
-rw-r--r--src/cpu/ozone/ozone_base_dyn_inst.cc2
-rw-r--r--src/cpu/ozone/ozone_impl.hh4
-rw-r--r--src/cpu/ozone/rename_table.cc2
-rw-r--r--src/cpu/ozone/simple_base_dyn_inst.cc2
-rw-r--r--src/cpu/ozone/simple_cpu_builder.cc2
-rw-r--r--src/cpu/ozone/simple_impl.hh2
-rw-r--r--src/cpu/pc_event.cc2
-rw-r--r--src/cpu/profile.cc4
-rw-r--r--src/cpu/profile.hh2
-rw-r--r--src/cpu/quiesce_event.cc2
-rw-r--r--src/cpu/sched_list.hh2
-rw-r--r--src/cpu/simple/atomic.cc2
-rw-r--r--src/cpu/simple/base.cc4
-rw-r--r--src/cpu/simple/base.hh2
-rw-r--r--src/cpu/simple/timing.cc2
-rw-r--r--src/cpu/simple/timing.hh1
-rw-r--r--src/cpu/simple_thread.hh2
-rw-r--r--src/cpu/static_inst.cc1
-rw-r--r--src/cpu/static_inst.hh4
-rw-r--r--src/cpu/testers/directedtest/InvalidateGenerator.cc2
-rw-r--r--src/cpu/testers/directedtest/InvalidateGenerator.hh2
-rw-r--r--src/cpu/testers/directedtest/RubyDirectedTester.hh6
-rw-r--r--src/cpu/testers/memtest/memtest.cc2
-rw-r--r--src/cpu/testers/memtest/memtest.hh6
-rw-r--r--src/cpu/testers/networktest/networktest.cc4
-rw-r--r--src/cpu/testers/networktest/networktest.hh6
-rw-r--r--src/cpu/testers/rubytest/CheckTable.cc1
-rw-r--r--src/cpu/testers/rubytest/RubyTester.hh6
-rw-r--r--src/cpu/thread_context.hh2
-rw-r--r--src/cpu/thread_state.hh2
-rw-r--r--src/cpu/trace/opt_cpu.cc2
-rw-r--r--src/cpu/trace/reader/ibm_reader.hh3
-rw-r--r--src/cpu/trace/reader/itx_reader.hh3
-rw-r--r--src/cpu/trace/reader/mem_trace_reader.hh2
-rw-r--r--src/cpu/trace/trace_cpu.cc2
-rw-r--r--src/dev/alpha/tsunami.cc4
-rw-r--r--src/dev/alpha/tsunami_io.cc4
-rw-r--r--src/dev/alpha/tsunami_io.hh2
-rw-r--r--src/dev/alpha/tsunami_pchip.cc2
-rw-r--r--src/dev/arm/amba_device.cc2
-rw-r--r--src/dev/arm/amba_device.hh4
-rw-r--r--src/dev/arm/kmi.cc2
-rw-r--r--src/dev/arm/kmi.hh2
-rw-r--r--src/dev/arm/pl111.cc2
-rw-r--r--src/dev/disk_image.cc4
-rw-r--r--src/dev/disk_image.hh4
-rw-r--r--src/dev/etherbus.hh5
-rw-r--r--src/dev/etherdump.hh3
-rw-r--r--src/dev/etherint.cc2
-rw-r--r--src/dev/etherlink.cc2
-rw-r--r--src/dev/etherlink.hh1
-rw-r--r--src/dev/ethertap.cc1
-rw-r--r--src/dev/ethertap.hh2
-rw-r--r--src/dev/ide_ctrl.hh2
-rw-r--r--src/dev/ide_disk.cc2
-rw-r--r--src/dev/ide_disk.hh3
-rw-r--r--src/dev/intel_8254_timer.hh2
-rw-r--r--src/dev/io_device.cc1
-rw-r--r--src/dev/isa_fake.hh2
-rw-r--r--src/dev/mc146818.cc2
-rwxr-xr-xsrc/dev/mips/malta.cc4
-rwxr-xr-xsrc/dev/mips/malta_cchip.hh2
-rwxr-xr-xsrc/dev/mips/malta_io.cc4
-rwxr-xr-xsrc/dev/mips/malta_pchip.cc2
-rwxr-xr-xsrc/dev/mips/malta_pchip.hh2
-rw-r--r--src/dev/pciconfigall.hh3
-rw-r--r--src/dev/platform.hh2
-rw-r--r--src/dev/ps2.cc3
-rw-r--r--src/dev/simple_disk.hh2
-rw-r--r--src/dev/sparc/iob.cc4
-rw-r--r--src/dev/sparc/iob.hh2
-rw-r--r--src/dev/sparc/mm_disk.cc2
-rw-r--r--src/dev/sparc/mm_disk.hh2
-rw-r--r--src/dev/terminal.cc4
-rw-r--r--src/dev/terminal.hh4
-rw-r--r--src/dev/x86/i8042.hh6
-rw-r--r--src/dev/x86/i82094aa.hh6
-rw-r--r--src/dev/x86/i8259.hh4
-rw-r--r--src/dev/x86/intdev.hh11
-rw-r--r--src/dev/x86/pc.cc2
-rw-r--r--src/dev/x86/south_bridge.hh2
-rw-r--r--src/kern/kernel_stats.cc2
-rw-r--r--src/kern/kernel_stats.hh2
-rw-r--r--src/kern/linux/events.cc2
-rw-r--r--src/kern/linux/printk.cc3
-rw-r--r--src/kern/operatingsystem.cc2
-rw-r--r--src/kern/tru64/dump_mbuf.cc3
-rw-r--r--src/kern/tru64/printf.cc1
-rw-r--r--src/kern/tru64/tru64.hh11
-rw-r--r--src/kern/tru64/tru64_events.cc6
-rw-r--r--src/mem/bridge.hh2
-rw-r--r--src/mem/bus.hh4
-rw-r--r--src/mem/cache/base.hh2
-rw-r--r--src/mem/cache/blk.hh2
-rw-r--r--src/mem/cache/builder.cc5
-rw-r--r--src/mem/cache/cache.hh2
-rw-r--r--src/mem/cache/cache_impl.hh2
-rw-r--r--src/mem/cache/mshr_queue.hh2
-rw-r--r--src/mem/cache/prefetch/base.cc2
-rw-r--r--src/mem/cache/prefetch/stride.hh3
-rw-r--r--src/mem/cache/tags/base.cc3
-rw-r--r--src/mem/cache/tags/base.hh3
-rw-r--r--src/mem/cache/tags/cacheset.hh4
-rw-r--r--src/mem/cache/tags/fa_lru.hh2
-rw-r--r--src/mem/cache/tags/iic.cc2
-rw-r--r--src/mem/cache/tags/iic.hh6
-rw-r--r--src/mem/cache/tags/iic_repl/gen.cc2
-rw-r--r--src/mem/cache/tags/iic_repl/repl.hh2
-rw-r--r--src/mem/cache/tags/lru.cc2
-rw-r--r--src/mem/cache/tags/lru.hh2
-rw-r--r--src/mem/packet.cc3
-rw-r--r--src/mem/packet.hh2
-rw-r--r--src/mem/page_table.cc4
-rw-r--r--src/mem/physical.cc4
-rw-r--r--src/mem/ruby/buffers/MessageBuffer.hh4
-rw-r--r--src/mem/ruby/common/NetDest.cc2
-rw-r--r--src/mem/ruby/common/Set.hh2
-rw-r--r--src/mem/ruby/filters/GenericBloomFilter.hh2
-rw-r--r--src/mem/ruby/network/Network.cc2
-rw-r--r--src/mem/ruby/network/garnet/BaseGarnetNetwork.hh2
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc10
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh2
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.hh8
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc2
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh8
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.cc2
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh2
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.cc2
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.hh2
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/OutputUnit_d.hh8
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/Router_d.cc8
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh4
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.cc4
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.hh4
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc6
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.hh2
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc4
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.hh2
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.cc6
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.hh4
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.hh2
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/flitBuffer_d.hh2
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/FlexibleConsumer.hh2
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc12
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh2
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc2
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.hh6
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/NetworkLink.cc2
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/NetworkLink.hh4
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/Router.cc4
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/Router.hh10
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/VCarbiter.cc2
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/VCarbiter.hh2
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/flitBuffer.hh2
-rw-r--r--src/mem/ruby/network/orion/Allocator/Arbiter.cc2
-rw-r--r--src/mem/ruby/network/orion/Allocator/MatrixArbiter.hh3
-rw-r--r--src/mem/ruby/network/orion/Allocator/RRArbiter.cc4
-rw-r--r--src/mem/ruby/network/orion/Allocator/RRArbiter.hh2
-rw-r--r--src/mem/ruby/network/orion/Allocator/SWAllocator.cc6
-rw-r--r--src/mem/ruby/network/orion/Allocator/VCAllocator.cc8
-rw-r--r--src/mem/ruby/network/orion/Buffer/Buffer.cc8
-rw-r--r--src/mem/ruby/network/orion/Buffer/DecoderUnit.hh2
-rw-r--r--src/mem/ruby/network/orion/Buffer/OutdrvUnit.cc2
-rw-r--r--src/mem/ruby/network/orion/Buffer/PrechargeUnit.cc2
-rw-r--r--src/mem/ruby/network/orion/Buffer/Register.cc4
-rw-r--r--src/mem/ruby/network/orion/Buffer/SRAM.cc10
-rw-r--r--src/mem/ruby/network/orion/Buffer/SRAM.hh2
-rw-r--r--src/mem/ruby/network/orion/Buffer/WordlineUnit.cc2
-rw-r--r--src/mem/ruby/network/orion/Clock.cc2
-rw-r--r--src/mem/ruby/network/orion/ConfigFile.hh6
-rw-r--r--src/mem/ruby/network/orion/Crossbar/Crossbar.cc6
-rw-r--r--src/mem/ruby/network/orion/Crossbar/MatrixCrossbar.cc2
-rw-r--r--src/mem/ruby/network/orion/Crossbar/MatrixCrossbar.hh2
-rw-r--r--src/mem/ruby/network/orion/Crossbar/MultreeCrossbar.cc2
-rw-r--r--src/mem/ruby/network/orion/Crossbar/MultreeCrossbar.hh2
-rw-r--r--src/mem/ruby/network/orion/FlipFlop.cc2
-rw-r--r--src/mem/ruby/network/orion/NetworkPower.cc2
-rw-r--r--src/mem/ruby/network/orion/NetworkPower.hh8
-rw-r--r--src/mem/ruby/network/orion/OrionConfig.cc2
-rw-r--r--src/mem/ruby/network/orion/OrionConfig.hh2
-rw-r--r--src/mem/ruby/network/orion/OrionLink.cc4
-rw-r--r--src/mem/ruby/network/orion/OrionRouter.cc8
-rw-r--r--src/mem/ruby/network/orion/TechParameter.cc6
-rw-r--r--src/mem/ruby/network/orion/Wire.cc4
-rw-r--r--src/mem/ruby/network/orion/orion.hh2
-rw-r--r--src/mem/ruby/network/simple/PerfectSwitch.hh2
-rw-r--r--src/mem/ruby/network/simple/Switch.cc2
-rw-r--r--src/mem/ruby/network/simple/Throttle.cc2
-rw-r--r--src/mem/ruby/network/simple/Throttle.hh2
-rw-r--r--src/mem/ruby/network/simple/Topology.cc2
-rw-r--r--src/mem/ruby/profiler/CacheProfiler.hh4
-rw-r--r--src/mem/ruby/profiler/Profiler.cc3
-rw-r--r--src/mem/ruby/profiler/Profiler.hh4
-rw-r--r--src/mem/ruby/recorder/CacheRecorder.cc3
-rw-r--r--src/mem/ruby/recorder/CacheRecorder.hh2
-rw-r--r--src/mem/ruby/recorder/Tracer.hh3
-rw-r--r--src/mem/ruby/slicc_interface/AbstractEntry.hh2
-rw-r--r--src/mem/ruby/slicc_interface/RubyRequest.hh6
-rw-r--r--src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.cc2
-rw-r--r--src/mem/ruby/slicc_interface/RubySlicc_includes.hh2
-rw-r--r--src/mem/ruby/system/CacheMemory.hh4
-rw-r--r--src/mem/ruby/system/RubyPort.cc2
-rw-r--r--src/mem/ruby/system/RubyPort.hh4
-rw-r--r--src/mem/ruby/system/Sequencer.cc5
-rw-r--r--src/mem/ruby/system/Sequencer.hh4
-rw-r--r--src/mem/ruby/system/WireBuffer.hh3
-rw-r--r--src/mem/slicc/symbols/StateMachine.py31
-rw-r--r--src/mem/tport.hh5
-rw-r--r--src/mem/translating_port.cc2
-rw-r--r--src/mem/vport.hh5
-rw-r--r--src/python/swig/core.i5
-rw-r--r--src/python/swig/event.i8
-rw-r--r--src/python/swig/inet.i2
-rw-r--r--src/python/swig/pyobject.cc2
-rw-r--r--src/python/swig/sim_object.i2
-rw-r--r--src/python/swig/stats.i3
-rw-r--r--src/python/swig/system.i2
-rw-r--r--src/sim/faults.cc4
-rw-r--r--src/sim/faults.hh4
-rw-r--r--src/sim/init.cc7
-rw-r--r--src/sim/process.cc6
-rw-r--r--src/sim/process_impl.hh1
-rw-r--r--src/sim/pseudo_inst.cc4
-rw-r--r--src/sim/serialize.cc4
-rw-r--r--src/sim/serialize.hh4
-rw-r--r--src/sim/stat_control.cc1
-rw-r--r--src/sim/syscall_emul.cc6
-rw-r--r--src/sim/syscall_emul.hh10
-rw-r--r--src/sim/system.cc4
-rw-r--r--src/sim/tlb.cc2
-rw-r--r--src/sim/vptr.hh2
-rw-r--r--src/unittest/cprintftest.cc2
-rw-r--r--src/unittest/cprintftime.cc2
-rw-r--r--src/unittest/initest.cc4
-rw-r--r--src/unittest/rangemaptest.cc2
-rw-r--r--src/unittest/stattest.cc4
-rw-r--r--src/unittest/symtest.cc2
511 files changed, 955 insertions, 994 deletions
diff --git a/src/arch/alpha/faults.cc b/src/arch/alpha/faults.cc
index 38386cce1..4f84a151a 100644
--- a/src/arch/alpha/faults.cc
+++ b/src/arch/alpha/faults.cc
@@ -32,13 +32,13 @@
#include "arch/alpha/ev5.hh"
#include "arch/alpha/faults.hh"
#include "arch/alpha/tlb.hh"
-#include "cpu/thread_context.hh"
-#include "cpu/base.hh"
#include "base/trace.hh"
+#include "cpu/base.hh"
+#include "cpu/thread_context.hh"
#if !FULL_SYSTEM
-#include "sim/process.hh"
#include "mem/page_table.hh"
+#include "sim/process.hh"
#endif
namespace AlphaISA {
diff --git a/src/arch/alpha/isa.hh b/src/arch/alpha/isa.hh
index 500bd039b..f1bfcebec 100644
--- a/src/arch/alpha/isa.hh
+++ b/src/arch/alpha/isa.hh
@@ -31,10 +31,9 @@
#ifndef __ARCH_ALPHA_ISA_HH__
#define __ARCH_ALPHA_ISA_HH__
-#include <string.h>
-
-#include <string>
+#include <cstring>
#include <iostream>
+#include <string>
#include "arch/alpha/registers.hh"
#include "arch/alpha/types.hh"
diff --git a/src/arch/alpha/isa/main.isa b/src/arch/alpha/isa/main.isa
index 077520139..4b5678e81 100644
--- a/src/arch/alpha/isa/main.isa
+++ b/src/arch/alpha/isa/main.isa
@@ -41,16 +41,16 @@
//
output header {{
-#include <sstream>
-#include <iostream>
#include <iomanip>
+#include <iostream>
+#include <sstream>
#include "arch/alpha/faults.hh"
#include "arch/alpha/types.hh"
#include "config/ss_compatible_fp.hh"
#include "cpu/static_inst.hh"
-#include "mem/request.hh" // some constructors use MemReq flags
#include "mem/packet.hh"
+#include "mem/request.hh" // some constructors use MemReq flags
}};
output decoder {{
@@ -58,9 +58,9 @@ output decoder {{
#include "arch/alpha/registers.hh"
#include "arch/alpha/regredir.hh"
+#include "base/loader/symtab.hh"
#include "base/cprintf.hh"
#include "base/fenv.hh"
-#include "base/loader/symtab.hh"
#include "config/ss_compatible_fp.hh"
#include "cpu/thread_context.hh" // for Jump::branchTarget()
#include "mem/packet.hh"
@@ -71,16 +71,16 @@ using namespace AlphaISA;
output exec {{
#include <math.h>
+#include "arch/alpha/registers.hh"
#include "arch/alpha/regredir.hh"
#include "base/cp_annotate.hh"
-#include "sim/pseudo_inst.hh"
-#include "arch/alpha/registers.hh"
#include "base/fenv.hh"
#include "config/ss_compatible_fp.hh"
#include "cpu/base.hh"
#include "cpu/exetrace.hh"
#include "mem/packet.hh"
#include "mem/packet_access.hh"
+#include "sim/pseudo_inst.hh"
#include "sim/sim_exit.hh"
using namespace AlphaISA;
diff --git a/src/arch/alpha/linux/system.cc b/src/arch/alpha/linux/system.cc
index 1bb8bd2cf..e7440e003 100644
--- a/src/arch/alpha/linux/system.cc
+++ b/src/arch/alpha/linux/system.cc
@@ -40,17 +40,17 @@
* up boot time.
*/
-#include "arch/vtophys.hh"
-#include "arch/alpha/idle_event.hh"
#include "arch/alpha/linux/system.hh"
#include "arch/alpha/linux/threadinfo.hh"
+#include "arch/alpha/idle_event.hh"
#include "arch/alpha/system.hh"
+#include "arch/vtophys.hh"
#include "base/loader/symtab.hh"
-#include "cpu/thread_context.hh"
#include "cpu/base.hh"
+#include "cpu/thread_context.hh"
#include "dev/platform.hh"
-#include "kern/linux/printk.hh"
#include "kern/linux/events.hh"
+#include "kern/linux/printk.hh"
#include "mem/physical.hh"
#include "mem/port.hh"
#include "sim/arguments.hh"
diff --git a/src/arch/alpha/mt.hh b/src/arch/alpha/mt.hh
index 57cf90f79..03ecf8486 100644
--- a/src/arch/alpha/mt.hh
+++ b/src/arch/alpha/mt.hh
@@ -38,12 +38,12 @@
* ISA-specific helper functions for multithreaded execution.
*/
+#include <iostream>
+
#include "arch/isa_traits.hh"
#include "base/bitfield.hh"
-#include "base/trace.hh"
#include "base/misc.hh"
-
-#include <iostream>
+#include "base/trace.hh"
using namespace std;
namespace AlphaISA
diff --git a/src/arch/alpha/process.cc b/src/arch/alpha/process.cc
index 3c3fd9b25..269a7bd63 100644
--- a/src/arch/alpha/process.cc
+++ b/src/arch/alpha/process.cc
@@ -31,8 +31,8 @@
#include "arch/alpha/isa_traits.hh"
#include "arch/alpha/process.hh"
-#include "base/loader/object_file.hh"
#include "base/loader/elf_object.hh"
+#include "base/loader/object_file.hh"
#include "base/misc.hh"
#include "cpu/thread_context.hh"
#include "mem/page_table.hh"
diff --git a/src/arch/alpha/remote_gdb.cc b/src/arch/alpha/remote_gdb.cc
index 9a2a5f23f..f05b448fa 100644
--- a/src/arch/alpha/remote_gdb.cc
+++ b/src/arch/alpha/remote_gdb.cc
@@ -127,15 +127,15 @@
#endif
#include "arch/alpha/kgdb.h"
-#include "arch/alpha/utility.hh"
#include "arch/alpha/regredir.hh"
#include "arch/alpha/remote_gdb.hh"
+#include "arch/alpha/utility.hh"
#include "base/intmath.hh"
#include "base/remote_gdb.hh"
#include "base/socket.hh"
#include "base/trace.hh"
-#include "cpu/thread_context.hh"
#include "cpu/static_inst.hh"
+#include "cpu/thread_context.hh"
#include "mem/physical.hh"
#include "mem/port.hh"
#include "sim/system.hh"
diff --git a/src/arch/alpha/remote_gdb.hh b/src/arch/alpha/remote_gdb.hh
index 43d0580d8..b7aef5f64 100644
--- a/src/arch/alpha/remote_gdb.hh
+++ b/src/arch/alpha/remote_gdb.hh
@@ -33,12 +33,12 @@
#include <map>
-#include "arch/alpha/types.hh"
#include "arch/alpha/kgdb.h"
-#include "base/remote_gdb.hh"
-#include "cpu/pc_event.hh"
+#include "arch/alpha/types.hh"
#include "base/pollevent.hh"
+#include "base/remote_gdb.hh"
#include "base/socket.hh"
+#include "cpu/pc_event.hh"
class System;
class ThreadContext;
diff --git a/src/arch/alpha/tlb.cc b/src/arch/alpha/tlb.cc
index 58d54e790..6bcfffa3a 100644
--- a/src/arch/alpha/tlb.cc
+++ b/src/arch/alpha/tlb.cc
@@ -33,9 +33,9 @@
#include <string>
#include <vector>
+#include "arch/alpha/faults.hh"
#include "arch/alpha/pagetable.hh"
#include "arch/alpha/tlb.hh"
-#include "arch/alpha/faults.hh"
#include "base/inifile.hh"
#include "base/str.hh"
#include "base/trace.hh"
diff --git a/src/arch/alpha/tru64/process.cc b/src/arch/alpha/tru64/process.cc
index b10fea02b..96fe2725f 100644
--- a/src/arch/alpha/tru64/process.cc
+++ b/src/arch/alpha/tru64/process.cc
@@ -29,9 +29,9 @@
* Ali Saidi
*/
+#include "arch/alpha/tru64/process.hh"
#include "arch/alpha/tru64/tru64.hh"
#include "arch/alpha/isa_traits.hh"
-#include "arch/alpha/tru64/process.hh"
#include "cpu/thread_context.hh"
#include "kern/tru64/tru64.hh"
#include "sim/byteswap.hh"
diff --git a/src/arch/alpha/types.hh b/src/arch/alpha/types.hh
index 4713f0849..645e09105 100644
--- a/src/arch/alpha/types.hh
+++ b/src/arch/alpha/types.hh
@@ -32,8 +32,8 @@
#ifndef __ARCH_ALPHA_TYPES_HH__
#define __ARCH_ALPHA_TYPES_HH__
-#include "base/types.hh"
#include "arch/generic/types.hh"
+#include "base/types.hh"
namespace AlphaISA {
diff --git a/src/arch/alpha/utility.hh b/src/arch/alpha/utility.hh
index fdac8b8d1..8759b49ce 100644
--- a/src/arch/alpha/utility.hh
+++ b/src/arch/alpha/utility.hh
@@ -32,9 +32,9 @@
#ifndef __ARCH_ALPHA_UTILITY_HH__
#define __ARCH_ALPHA_UTILITY_HH__
-#include "arch/alpha/types.hh"
#include "arch/alpha/isa_traits.hh"
#include "arch/alpha/registers.hh"
+#include "arch/alpha/types.hh"
#include "base/misc.hh"
#include "config/full_system.hh"
#include "cpu/static_inst.hh"
diff --git a/src/arch/arm/faults.cc b/src/arch/arm/faults.cc
index 01d43f338..4150adba6 100644
--- a/src/arch/arm/faults.cc
+++ b/src/arch/arm/faults.cc
@@ -43,9 +43,9 @@
*/
#include "arch/arm/faults.hh"
-#include "cpu/thread_context.hh"
-#include "cpu/base.hh"
#include "base/trace.hh"
+#include "cpu/base.hh"
+#include "cpu/thread_context.hh"
namespace ArmISA
{
diff --git a/src/arch/arm/faults.hh b/src/arch/arm/faults.hh
index 8df8d0abf..234d8cfec 100644
--- a/src/arch/arm/faults.hh
+++ b/src/arch/arm/faults.hh
@@ -47,9 +47,9 @@
#include "arch/arm/miscregs.hh"
#include "arch/arm/types.hh"
+#include "base/misc.hh"
#include "config/full_system.hh"
#include "sim/faults.hh"
-#include "base/misc.hh"
// The design of the "name" and "vect" functions is in sim/faults.hh
diff --git a/src/arch/arm/insts/macromem.cc b/src/arch/arm/insts/macromem.cc
index 28852bf89..e056856b6 100644
--- a/src/arch/arm/insts/macromem.cc
+++ b/src/arch/arm/insts/macromem.cc
@@ -40,9 +40,10 @@
* Authors: Stephen Hines
*/
+#include <sstream>
+
#include "arch/arm/insts/macromem.hh"
#include "arch/arm/decoder.hh"
-#include <sstream>
using namespace std;
using namespace ArmISAInst;
diff --git a/src/arch/arm/insts/static_inst.cc b/src/arch/arm/insts/static_inst.cc
index 528111759..8306c620f 100644
--- a/src/arch/arm/insts/static_inst.cc
+++ b/src/arch/arm/insts/static_inst.cc
@@ -40,11 +40,11 @@
* Authors: Stephen Hines
*/
-#include "arch/arm/faults.hh"
#include "arch/arm/insts/static_inst.hh"
+#include "arch/arm/faults.hh"
+#include "base/loader/symtab.hh"
#include "base/condcodes.hh"
#include "base/cprintf.hh"
-#include "base/loader/symtab.hh"
namespace ArmISA
{
diff --git a/src/arch/arm/insts/vfp.hh b/src/arch/arm/insts/vfp.hh
index e962704e0..57b74d040 100644
--- a/src/arch/arm/insts/vfp.hh
+++ b/src/arch/arm/insts/vfp.hh
@@ -40,11 +40,13 @@
#ifndef __ARCH_ARM_INSTS_VFP_HH__
#define __ARCH_ARM_INSTS_VFP_HH__
-#include "arch/arm/insts/misc.hh"
-#include "arch/arm/miscregs.hh"
#include <fenv.h>
+
#include <cmath>
+#include "arch/arm/insts/misc.hh"
+#include "arch/arm/miscregs.hh"
+
namespace ArmISA
{
diff --git a/src/arch/arm/intregs.hh b/src/arch/arm/intregs.hh
index 2cbed6c59..9da910106 100644
--- a/src/arch/arm/intregs.hh
+++ b/src/arch/arm/intregs.hh
@@ -40,7 +40,7 @@
* Authors: Gabe Black
*/
-#include <assert.h>
+#include <cassert>
#ifndef __ARCH_ARM_INTREGS_HH__
#define __ARCH_ARM_INTREGS_HH__
diff --git a/src/arch/arm/isa/includes.isa b/src/arch/arm/isa/includes.isa
index 5840cc9b2..aebce0944 100644
--- a/src/arch/arm/isa/includes.isa
+++ b/src/arch/arm/isa/includes.isa
@@ -46,8 +46,8 @@
//
output header {{
-#include <sstream>
#include <iostream>
+#include <sstream>
#include "arch/arm/insts/branch.hh"
#include "arch/arm/insts/macromem.hh"
@@ -67,21 +67,21 @@ output decoder {{
#include "arch/arm/intregs.hh"
#include "arch/arm/isa_traits.hh"
#include "arch/arm/utility.hh"
-#include "base/cprintf.hh"
#include "base/loader/symtab.hh"
+#include "base/cprintf.hh"
#include "cpu/thread_context.hh"
using namespace ArmISA;
}};
output exec {{
+#include <cmath>
+
#include "arch/arm/faults.hh"
#include "arch/arm/isa_traits.hh"
#include "arch/arm/utility.hh"
#include "base/condcodes.hh"
#include "sim/pseudo_inst.hh"
-
-#include <cmath>
#if defined(linux)
#include <fenv.h>
#endif
diff --git a/src/arch/arm/linux/atag.hh b/src/arch/arm/linux/atag.hh
index d01474ac0..b7c37dffd 100644
--- a/src/arch/arm/linux/atag.hh
+++ b/src/arch/arm/linux/atag.hh
@@ -42,6 +42,7 @@
#include <cstring>
#include <string>
+
#include "base/types.hh"
enum {
diff --git a/src/arch/arm/linux/linux.cc b/src/arch/arm/linux/linux.cc
index a26567475..1e3a1e725 100644
--- a/src/arch/arm/linux/linux.cc
+++ b/src/arch/arm/linux/linux.cc
@@ -29,10 +29,10 @@
* Authors: Stephen Hines
*/
-#include "arch/arm/linux/linux.hh"
-
#include <fcntl.h>
+#include "arch/arm/linux/linux.hh"
+
// open(2) flags translation table
OpenFlagTransTable ArmLinux::openFlagTable[] = {
#ifdef _MSC_VER
diff --git a/src/arch/arm/linux/process.cc b/src/arch/arm/linux/process.cc
index 6b449c2e7..f17749252 100644
--- a/src/arch/arm/linux/process.cc
+++ b/src/arch/arm/linux/process.cc
@@ -46,11 +46,9 @@
#include "arch/arm/linux/linux.hh"
#include "arch/arm/linux/process.hh"
#include "arch/arm/isa_traits.hh"
-
#include "base/trace.hh"
#include "cpu/thread_context.hh"
#include "kern/linux/linux.hh"
-
#include "sim/process.hh"
#include "sim/syscall_emul.hh"
#include "sim/system.hh"
diff --git a/src/arch/arm/linux/process.hh b/src/arch/arm/linux/process.hh
index f0a81c5fc..854b0b176 100644
--- a/src/arch/arm/linux/process.hh
+++ b/src/arch/arm/linux/process.hh
@@ -33,7 +33,6 @@
#include "arch/arm/process.hh"
-
/// A process with emulated Arm/Linux syscalls.
class ArmLinuxProcess : public ArmLiveProcess
{
diff --git a/src/arch/arm/linux/system.cc b/src/arch/arm/linux/system.cc
index 7aff2b6ef..0d34121b4 100644
--- a/src/arch/arm/linux/system.cc
+++ b/src/arch/arm/linux/system.cc
@@ -40,9 +40,9 @@
* Authors: Ali Saidi
*/
-#include "arch/arm/isa_traits.hh"
#include "arch/arm/linux/atag.hh"
#include "arch/arm/linux/system.hh"
+#include "arch/arm/isa_traits.hh"
#include "arch/arm/utility.hh"
#include "base/loader/object_file.hh"
#include "base/loader/symtab.hh"
diff --git a/src/arch/arm/locked_mem.hh b/src/arch/arm/locked_mem.hh
index f902bdb49..f95542bb0 100644
--- a/src/arch/arm/locked_mem.hh
+++ b/src/arch/arm/locked_mem.hh
@@ -43,7 +43,6 @@
#include "arch/arm/miscregs.hh"
#include "mem/request.hh"
-
namespace ArmISA
{
template <class XC>
diff --git a/src/arch/arm/pagetable.hh b/src/arch/arm/pagetable.hh
index 46322046f..6d84fbf7b 100644
--- a/src/arch/arm/pagetable.hh
+++ b/src/arch/arm/pagetable.hh
@@ -47,7 +47,6 @@
#include "arch/arm/utility.hh"
#include "arch/arm/vtophys.hh"
#include "config/full_system.hh"
-
#include "sim/serialize.hh"
namespace ArmISA {
diff --git a/src/arch/arm/predecoder.hh b/src/arch/arm/predecoder.hh
index e650d52d6..188f675bb 100644
--- a/src/arch/arm/predecoder.hh
+++ b/src/arch/arm/predecoder.hh
@@ -47,8 +47,8 @@
#include <cassert>
-#include "arch/arm/types.hh"
#include "arch/arm/miscregs.hh"
+#include "arch/arm/types.hh"
#include "base/types.hh"
class ThreadContext;
diff --git a/src/arch/arm/process.hh b/src/arch/arm/process.hh
index 8816b765d..26a59323f 100644
--- a/src/arch/arm/process.hh
+++ b/src/arch/arm/process.hh
@@ -33,6 +33,7 @@
#include <string>
#include <vector>
+
#include "base/loader/object_file.hh"
#include "sim/process.hh"
diff --git a/src/arch/arm/registers.hh b/src/arch/arm/registers.hh
index 30289ff27..14ec03471 100644
--- a/src/arch/arm/registers.hh
+++ b/src/arch/arm/registers.hh
@@ -43,8 +43,8 @@
#ifndef __ARCH_ARM_REGISTERS_HH__
#define __ARCH_ARM_REGISTERS_HH__
-#include "arch/arm/max_inst_regs.hh"
#include "arch/arm/intregs.hh"
+#include "arch/arm/max_inst_regs.hh"
#include "arch/arm/miscregs.hh"
namespace ArmISA {
diff --git a/src/arch/arm/remote_gdb.cc b/src/arch/arm/remote_gdb.cc
index bf7639575..2a4680782 100644
--- a/src/arch/arm/remote_gdb.cc
+++ b/src/arch/arm/remote_gdb.cc
@@ -139,22 +139,22 @@
#include "arch/arm/vtophys.hh"
#endif
-#include "arch/arm/utility.hh"
-#include "arch/arm/remote_gdb.hh"
+#include "arch/arm/pagetable.hh"
#include "arch/arm/registers.hh"
+#include "arch/arm/remote_gdb.hh"
+#include "arch/arm/utility.hh"
#include "arch/arm/vtophys.hh"
#include "base/intmath.hh"
#include "base/remote_gdb.hh"
#include "base/socket.hh"
#include "base/trace.hh"
+#include "cpu/static_inst.hh"
#include "cpu/thread_context.hh"
#include "cpu/thread_state.hh"
-#include "cpu/static_inst.hh"
+#include "mem/page_table.hh"
#include "mem/physical.hh"
#include "mem/port.hh"
#include "sim/system.hh"
-#include "arch/arm/pagetable.hh"
-#include "mem/page_table.hh"
using namespace std;
using namespace ArmISA;
diff --git a/src/arch/arm/system.cc b/src/arch/arm/system.cc
index f6e265ae4..d61db4cfe 100644
--- a/src/arch/arm/system.cc
+++ b/src/arch/arm/system.cc
@@ -40,9 +40,10 @@
* Authors: Ali Saidi
*/
-#include "arch/arm/system.hh"
#include <iostream>
+#include "arch/arm/system.hh"
+
using namespace std;
using namespace Linux;
diff --git a/src/arch/arm/system.hh b/src/arch/arm/system.hh
index c64673df5..8711e7cce 100644
--- a/src/arch/arm/system.hh
+++ b/src/arch/arm/system.hh
@@ -46,10 +46,10 @@
#include <string>
#include <vector>
+#include "kern/linux/events.hh"
#include "params/ArmSystem.hh"
#include "sim/sim_object.hh"
#include "sim/system.hh"
-#include "kern/linux/events.hh"
class ArmSystem : public System
{
diff --git a/src/arch/arm/table_walker.cc b/src/arch/arm/table_walker.cc
index 2d0e323f6..9296b951a 100644
--- a/src/arch/arm/table_walker.cc
+++ b/src/arch/arm/table_walker.cc
@@ -40,9 +40,9 @@
#include "arch/arm/faults.hh"
#include "arch/arm/table_walker.hh"
#include "arch/arm/tlb.hh"
-#include "dev/io_device.hh"
#include "cpu/base.hh"
#include "cpu/thread_context.hh"
+#include "dev/io_device.hh"
#include "sim/system.hh"
using namespace ArmISA;
diff --git a/src/arch/arm/table_walker.hh b/src/arch/arm/table_walker.hh
index 96a39cc61..85db1fa77 100644
--- a/src/arch/arm/table_walker.hh
+++ b/src/arch/arm/table_walker.hh
@@ -46,7 +46,6 @@
#include "arch/arm/tlb.hh"
#include "mem/mem_object.hh"
#include "mem/request.hh"
-#include "mem/request.hh"
#include "params/ArmTableWalker.hh"
#include "sim/eventq.hh"
#include "sim/fault_fwd.hh"
diff --git a/src/arch/arm/tlb.hh b/src/arch/arm/tlb.hh
index e60de38dd..269128c2a 100644
--- a/src/arch/arm/tlb.hh
+++ b/src/arch/arm/tlb.hh
@@ -46,9 +46,9 @@
#include <map>
#include "arch/arm/isa_traits.hh"
+#include "arch/arm/pagetable.hh"
#include "arch/arm/utility.hh"
#include "arch/arm/vtophys.hh"
-#include "arch/arm/pagetable.hh"
#include "base/statistics.hh"
#include "mem/request.hh"
#include "params/ArmTLB.hh"
diff --git a/src/arch/arm/vtophys.hh b/src/arch/arm/vtophys.hh
index 12b4846ed..a85209a4a 100644
--- a/src/arch/arm/vtophys.hh
+++ b/src/arch/arm/vtophys.hh
@@ -37,7 +37,6 @@
#include "arch/arm/isa_traits.hh"
#include "arch/arm/utility.hh"
-
class ThreadContext;
class FunctionalPort;
diff --git a/src/arch/generic/debugfaults.hh b/src/arch/generic/debugfaults.hh
index acffadc34..68bc6c533 100644
--- a/src/arch/generic/debugfaults.hh
+++ b/src/arch/generic/debugfaults.hh
@@ -40,11 +40,11 @@
#ifndef __ARCH_GENERIC_DEBUGFAULTS_HH__
#define __ARCH_GENERIC_DEBUGFAULTS_HH__
+#include <string>
+
#include "base/misc.hh"
#include "sim/faults.hh"
-#include <string>
-
namespace GenericISA
{
class M5DebugFault : public FaultBase
diff --git a/src/arch/generic/types.hh b/src/arch/generic/types.hh
index 214b01926..931349ac4 100644
--- a/src/arch/generic/types.hh
+++ b/src/arch/generic/types.hh
@@ -33,8 +33,8 @@
#include <iostream>
-#include "base/types.hh"
#include "base/trace.hh"
+#include "base/types.hh"
#include "sim/serialize.hh"
namespace GenericISA
diff --git a/src/arch/mips/dsp.cc b/src/arch/mips/dsp.cc
index b8b02ae9e..49698eec6 100755
--- a/src/arch/mips/dsp.cc
+++ b/src/arch/mips/dsp.cc
@@ -28,13 +28,13 @@
* Authors: Brett Miller
*/
-#include "arch/mips/isa_traits.hh"
#include "arch/mips/dsp.hh"
+#include "arch/mips/isa_traits.hh"
+#include "base/bitfield.hh"
+#include "base/misc.hh"
#include "config/full_system.hh"
#include "cpu/static_inst.hh"
#include "sim/serialize.hh"
-#include "base/bitfield.hh"
-#include "base/misc.hh"
using namespace MipsISA;
using namespace std;
diff --git a/src/arch/mips/dsp.hh b/src/arch/mips/dsp.hh
index 1cca51384..f13431714 100755
--- a/src/arch/mips/dsp.hh
+++ b/src/arch/mips/dsp.hh
@@ -31,8 +31,8 @@
#ifndef __ARCH_MIPS_DSP_HH__
#define __ARCH_MIPS_DSP_HH__
-#include "arch/mips/types.hh"
#include "arch/mips/isa_traits.hh"
+#include "arch/mips/types.hh"
#include "base/misc.hh"
#include "base/types.hh"
#include "config/full_system.hh"
diff --git a/src/arch/mips/isa.cc b/src/arch/mips/isa.cc
index 66d8b0815..902574bac 100644
--- a/src/arch/mips/isa.cc
+++ b/src/arch/mips/isa.cc
@@ -29,8 +29,8 @@
*/
#include "arch/mips/isa.hh"
-#include "arch/mips/mt_constants.hh"
#include "arch/mips/mt.hh"
+#include "arch/mips/mt_constants.hh"
#include "arch/mips/pra_constants.hh"
#include "base/bitfield.hh"
#include "cpu/base.hh"
diff --git a/src/arch/mips/isa.hh b/src/arch/mips/isa.hh
index cc075a9a6..720c7725e 100644
--- a/src/arch/mips/isa.hh
+++ b/src/arch/mips/isa.hh
@@ -31,8 +31,8 @@
#ifndef __ARCH_MIPS_ISA_HH__
#define __ARCH_MIPS_ISA_HH__
-#include <string>
#include <queue>
+#include <string>
#include <vector>
#include "arch/mips/registers.hh"
diff --git a/src/arch/mips/isa/includes.isa b/src/arch/mips/isa/includes.isa
index d5e1448ac..b0d1aa748 100644
--- a/src/arch/mips/isa/includes.isa
+++ b/src/arch/mips/isa/includes.isa
@@ -34,9 +34,9 @@
//
output header {{
-#include <sstream>
-#include <iostream>
#include <iomanip>
+#include <iostream>
+#include <sstream>
#include "arch/mips/isa_traits.hh"
#include "arch/mips/types.hh"
@@ -45,20 +45,19 @@ output header {{
}};
output decoder {{
-#include "arch/mips/isa_traits.hh"
-#include "base/cprintf.hh"
-#include "base/loader/symtab.hh"
-#include "cpu/thread_context.hh"
+#include <math.h>
+
+#include "arch/mips/dsp.hh"
+#include "arch/mips/dt_constants.hh"
#include "arch/mips/faults.hh"
#include "arch/mips/isa_traits.hh"
-#include "arch/mips/pra_constants.hh"
-#include "arch/mips/dt_constants.hh"
#include "arch/mips/mt_constants.hh"
+#include "arch/mips/pra_constants.hh"
#include "arch/mips/utility.hh"
-#include "arch/mips/dsp.hh"
+#include "base/loader/symtab.hh"
+#include "base/cprintf.hh"
+#include "cpu/thread_context.hh"
#include "mem/packet.hh"
-
-#include <math.h>
#if defined(linux)
#include <fenv.h>
#endif
@@ -67,29 +66,27 @@ using namespace MipsISA;
}};
output exec {{
+#include <math.h>
+
+#include "arch/mips/dsp.hh"
+#include "arch/mips/dt_constants.hh"
#include "arch/mips/faults.hh"
#include "arch/mips/isa_traits.hh"
-#include "arch/mips/utility.hh"
-#include "arch/mips/dsp.hh"
#include "arch/mips/mt.hh"
-#include "arch/mips/pra_constants.hh"
-#include "arch/mips/dt_constants.hh"
#include "arch/mips/mt_constants.hh"
-
-#include <math.h>
+#include "arch/mips/pra_constants.hh"
+#include "arch/mips/utility.hh"
#if defined(linux)
#include <fenv.h>
#endif
#include "cpu/base.hh"
#include "cpu/exetrace.hh"
-
#include "mem/packet.hh"
#include "mem/packet_access.hh"
-
-#include "sim/sim_exit.hh"
#include "sim/eventq.hh"
#include "sim/sim_events.hh"
+#include "sim/sim_exit.hh"
using namespace MipsISA;
}};
diff --git a/src/arch/mips/isa_traits.hh b/src/arch/mips/isa_traits.hh
index 648713926..4d07c5abe 100644
--- a/src/arch/mips/isa_traits.hh
+++ b/src/arch/mips/isa_traits.hh
@@ -34,8 +34,8 @@
#ifndef __ARCH_MIPS_ISA_TRAITS_HH__
#define __ARCH_MIPS_ISA_TRAITS_HH__
-#include "arch/mips/types.hh"
#include "arch/mips/mips_core_specific.hh"
+#include "arch/mips/types.hh"
#include "base/types.hh"
#include "config/full_system.hh"
diff --git a/src/arch/mips/linux/linux.cc b/src/arch/mips/linux/linux.cc
index 6cfc93585..8c4e3bf8c 100644
--- a/src/arch/mips/linux/linux.cc
+++ b/src/arch/mips/linux/linux.cc
@@ -28,10 +28,10 @@
* Authors: Korey Sewell
*/
-#include "arch/mips/linux/linux.hh"
-
#include <fcntl.h>
+#include "arch/mips/linux/linux.hh"
+
// open(2) flags translation table
OpenFlagTransTable MipsLinux::openFlagTable[] = {
#ifdef _MSC_VER
diff --git a/src/arch/mips/linux/process.cc b/src/arch/mips/linux/process.cc
index f3cac84e8..fa8e659b6 100644
--- a/src/arch/mips/linux/process.cc
+++ b/src/arch/mips/linux/process.cc
@@ -36,10 +36,10 @@
#include "base/trace.hh"
#include "cpu/thread_context.hh"
#include "kern/linux/linux.hh"
+#include "sim/eventq.hh"
#include "sim/process.hh"
-#include "sim/system.hh"
#include "sim/syscall_emul.hh"
-#include "sim/eventq.hh"
+#include "sim/system.hh"
using namespace std;
using namespace MipsISA;
diff --git a/src/arch/mips/linux/process.hh b/src/arch/mips/linux/process.hh
index 8c45014e0..fd96be4c1 100644
--- a/src/arch/mips/linux/process.hh
+++ b/src/arch/mips/linux/process.hh
@@ -32,8 +32,8 @@
#ifndef __MIPS_LINUX_PROCESS_HH__
#define __MIPS_LINUX_PROCESS_HH__
-#include "arch/mips/process.hh"
#include "arch/mips/linux/linux.hh"
+#include "arch/mips/process.hh"
#include "sim/eventq.hh"
/// A process with emulated Mips/Linux syscalls.
diff --git a/src/arch/mips/linux/system.cc b/src/arch/mips/linux/system.cc
index ff07f526a..67e21574e 100644
--- a/src/arch/mips/linux/system.cc
+++ b/src/arch/mips/linux/system.cc
@@ -39,17 +39,17 @@
* up boot time.
*/
-#include "arch/vtophys.hh"
-#include "arch/mips/idle_event.hh"
#include "arch/mips/linux/system.hh"
#include "arch/mips/linux/threadinfo.hh"
+#include "arch/mips/idle_event.hh"
#include "arch/mips/system.hh"
+#include "arch/vtophys.hh"
#include "base/loader/symtab.hh"
-#include "cpu/thread_context.hh"
#include "cpu/base.hh"
+#include "cpu/thread_context.hh"
#include "dev/platform.hh"
-#include "kern/linux/printk.hh"
#include "kern/linux/events.hh"
+#include "kern/linux/printk.hh"
#include "mem/physical.hh"
#include "mem/port.hh"
#include "sim/arguments.hh"
diff --git a/src/arch/mips/mt.hh b/src/arch/mips/mt.hh
index c63c65a73..f163d3240 100755
--- a/src/arch/mips/mt.hh
+++ b/src/arch/mips/mt.hh
@@ -37,16 +37,16 @@
* ISA-specific helper functions for multithreaded execution.
*/
+#include <iostream>
+
#include "arch/mips/faults.hh"
#include "arch/mips/isa_traits.hh"
#include "arch/mips/mt_constants.hh"
#include "arch/mips/pra_constants.hh"
#include "arch/mips/registers.hh"
#include "base/bitfield.hh"
-#include "base/trace.hh"
#include "base/misc.hh"
-
-#include <iostream>
+#include "base/trace.hh"
namespace MipsISA
{
diff --git a/src/arch/mips/process.cc b/src/arch/mips/process.cc
index 26a2a0ddb..b6f21c95c 100644
--- a/src/arch/mips/process.cc
+++ b/src/arch/mips/process.cc
@@ -32,8 +32,8 @@
#include "arch/mips/isa_traits.hh"
#include "arch/mips/process.hh"
-#include "base/loader/object_file.hh"
#include "base/loader/elf_object.hh"
+#include "base/loader/object_file.hh"
#include "base/misc.hh"
#include "cpu/thread_context.hh"
#include "mem/page_table.hh"
diff --git a/src/arch/mips/process.hh b/src/arch/mips/process.hh
index a065feb8f..3f9a7aff0 100644
--- a/src/arch/mips/process.hh
+++ b/src/arch/mips/process.hh
@@ -34,6 +34,7 @@
#include <string>
#include <vector>
+
#include "sim/process.hh"
class LiveProcess;
diff --git a/src/arch/mips/system.cc b/src/arch/mips/system.cc
index 6e2ad4d5a..c1735b740 100755
--- a/src/arch/mips/system.cc
+++ b/src/arch/mips/system.cc
@@ -33,15 +33,14 @@
#include "arch/mips/system.hh"
#include "arch/vtophys.hh"
-#include "base/loader/object_file.hh"
#include "base/loader/hex_file.hh"
+#include "base/loader/object_file.hh"
#include "base/loader/symtab.hh"
#include "base/trace.hh"
#include "mem/physical.hh"
#include "params/MipsSystem.hh"
#include "sim/byteswap.hh"
-
using namespace LittleEndianGuest;
MipsSystem::MipsSystem(Params *p) : System(p)
diff --git a/src/arch/mips/system.hh b/src/arch/mips/system.hh
index cfdf316b3..128f36581 100755
--- a/src/arch/mips/system.hh
+++ b/src/arch/mips/system.hh
@@ -37,13 +37,13 @@
#include <string>
#include <vector>
-#include "sim/system.hh"
-#include "base/loader/symtab.hh"
#include "base/loader/hex_file.hh"
+#include "base/loader/symtab.hh"
#include "cpu/pc_event.hh"
#include "kern/system_events.hh"
#include "params/MipsSystem.hh"
#include "sim/sim_object.hh"
+#include "sim/system.hh"
class MipsSystem : public System
{
diff --git a/src/arch/mips/tlb.cc b/src/arch/mips/tlb.cc
index 288c8e88e..b73eae72f 100644
--- a/src/arch/mips/tlb.cc
+++ b/src/arch/mips/tlb.cc
@@ -34,18 +34,18 @@
#include <string>
#include <vector>
-#include "arch/mips/pra_constants.hh"
+#include "arch/mips/faults.hh"
#include "arch/mips/pagetable.hh"
+#include "arch/mips/pra_constants.hh"
#include "arch/mips/tlb.hh"
-#include "arch/mips/faults.hh"
#include "arch/mips/utility.hh"
#include "base/inifile.hh"
#include "base/str.hh"
#include "base/trace.hh"
#include "cpu/thread_context.hh"
-#include "sim/process.hh"
#include "mem/page_table.hh"
#include "params/MipsTLB.hh"
+#include "sim/process.hh"
using namespace std;
using namespace MipsISA;
diff --git a/src/arch/mips/tlb.hh b/src/arch/mips/tlb.hh
index 5c8b10263..4b1456862 100644
--- a/src/arch/mips/tlb.hh
+++ b/src/arch/mips/tlb.hh
@@ -38,15 +38,15 @@
#include <map>
#include "arch/mips/isa_traits.hh"
+#include "arch/mips/pagetable.hh"
#include "arch/mips/utility.hh"
#include "arch/mips/vtophys.hh"
-#include "arch/mips/pagetable.hh"
#include "base/statistics.hh"
#include "mem/request.hh"
#include "params/MipsTLB.hh"
#include "sim/fault_fwd.hh"
-#include "sim/tlb.hh"
#include "sim/sim_object.hh"
+#include "sim/tlb.hh"
class ThreadContext;
diff --git a/src/arch/mips/utility.cc b/src/arch/mips/utility.cc
index 0859eb80f..37f71416f 100644
--- a/src/arch/mips/utility.cc
+++ b/src/arch/mips/utility.cc
@@ -32,12 +32,12 @@
#include "arch/mips/isa_traits.hh"
#include "arch/mips/utility.hh"
+#include "base/bitfield.hh"
+#include "base/misc.hh"
#include "config/full_system.hh"
-#include "cpu/thread_context.hh"
#include "cpu/static_inst.hh"
+#include "cpu/thread_context.hh"
#include "sim/serialize.hh"
-#include "base/bitfield.hh"
-#include "base/misc.hh"
#if FULL_SYSTEM
#include "arch/mips/registers.hh"
diff --git a/src/arch/mips/utility.hh b/src/arch/mips/utility.hh
index 2f6726c59..61c43a158 100644
--- a/src/arch/mips/utility.hh
+++ b/src/arch/mips/utility.hh
@@ -33,9 +33,8 @@
#ifndef __ARCH_MIPS_UTILITY_HH__
#define __ARCH_MIPS_UTILITY_HH__
-#include "config/full_system.hh"
-#include "arch/mips/types.hh"
#include "arch/mips/isa_traits.hh"
+#include "arch/mips/types.hh"
#include "base/misc.hh"
#include "base/types.hh"
#include "config/full_system.hh"
diff --git a/src/arch/mips/vtophys.hh b/src/arch/mips/vtophys.hh
index 6fde36aac..5ecc30b1f 100644
--- a/src/arch/mips/vtophys.hh
+++ b/src/arch/mips/vtophys.hh
@@ -37,7 +37,6 @@
#include "arch/mips/isa_traits.hh"
#include "arch/mips/utility.hh"
-
class ThreadContext;
class FunctionalPort;
diff --git a/src/arch/power/insts/floating.hh b/src/arch/power/insts/floating.hh
index deeac82cf..65906e507 100644
--- a/src/arch/power/insts/floating.hh
+++ b/src/arch/power/insts/floating.hh
@@ -33,8 +33,8 @@
#define __ARCH_POWER_INSTS_FLOATING_HH__
#include "arch/power/insts/static_inst.hh"
-#include "base/cprintf.hh"
#include "base/bitfield.hh"
+#include "base/cprintf.hh"
namespace PowerISA
{
diff --git a/src/arch/power/insts/integer.hh b/src/arch/power/insts/integer.hh
index a7270cd38..f911eb08a 100644
--- a/src/arch/power/insts/integer.hh
+++ b/src/arch/power/insts/integer.hh
@@ -32,8 +32,8 @@
#define __ARCH_POWER_INSTS_INTEGER_HH__
#include "arch/power/insts/static_inst.hh"
-#include "base/cprintf.hh"
#include "base/bitfield.hh"
+#include "base/cprintf.hh"
namespace PowerISA
{
diff --git a/src/arch/power/isa/includes.isa b/src/arch/power/isa/includes.isa
index 47e8c1411..a9069710b 100644
--- a/src/arch/power/isa/includes.isa
+++ b/src/arch/power/isa/includes.isa
@@ -34,15 +34,15 @@
//
output header {{
-#include <sstream>
-#include <iostream>
#include <iomanip>
+#include <iostream>
+#include <sstream>
#include "arch/power/insts/branch.hh"
-#include "arch/power/insts/mem.hh"
-#include "arch/power/insts/integer.hh"
-#include "arch/power/insts/floating.hh"
#include "arch/power/insts/condition.hh"
+#include "arch/power/insts/floating.hh"
+#include "arch/power/insts/integer.hh"
+#include "arch/power/insts/mem.hh"
#include "arch/power/insts/misc.hh"
#include "arch/power/insts/static_inst.hh"
#include "arch/power/isa_traits.hh"
@@ -61,8 +61,8 @@ output decoder {{
#include "arch/power/faults.hh"
#include "arch/power/isa_traits.hh"
#include "arch/power/utility.hh"
-#include "base/cprintf.hh"
#include "base/loader/symtab.hh"
+#include "base/cprintf.hh"
#include "cpu/thread_context.hh"
using namespace PowerISA;
@@ -70,11 +70,11 @@ using std::isnan;
}};
output exec {{
+#include <cmath>
+
#include "arch/power/faults.hh"
#include "arch/power/isa_traits.hh"
#include "arch/power/utility.hh"
-
-#include <cmath>
#if defined(linux)
#include <fenv.h>
#endif
diff --git a/src/arch/power/linux/linux.cc b/src/arch/power/linux/linux.cc
index 113f3e48e..b614c0dcb 100644
--- a/src/arch/power/linux/linux.cc
+++ b/src/arch/power/linux/linux.cc
@@ -29,10 +29,10 @@
* Authors: Timothy M. Jones
*/
-#include "arch/power/linux/linux.hh"
-
#include <fcntl.h>
+#include "arch/power/linux/linux.hh"
+
// open(2) flags translation table
OpenFlagTransTable PowerLinux::openFlagTable[] = {
#ifdef _MSC_VER
diff --git a/src/arch/power/linux/process.cc b/src/arch/power/linux/process.cc
index c2587d5e7..1c1b2827f 100644
--- a/src/arch/power/linux/process.cc
+++ b/src/arch/power/linux/process.cc
@@ -35,11 +35,9 @@
#include "arch/power/linux/linux.hh"
#include "arch/power/linux/process.hh"
#include "arch/power/isa_traits.hh"
-
#include "base/trace.hh"
#include "cpu/thread_context.hh"
#include "kern/linux/linux.hh"
-
#include "sim/process.hh"
#include "sim/syscall_emul.hh"
#include "sim/system.hh"
diff --git a/src/arch/power/linux/process.hh b/src/arch/power/linux/process.hh
index bef7e8dae..c4600129e 100644
--- a/src/arch/power/linux/process.hh
+++ b/src/arch/power/linux/process.hh
@@ -35,7 +35,6 @@
#include "arch/power/process.hh"
-
/// A process with emulated PPC/Linux syscalls.
class PowerLinuxProcess : public PowerLiveProcess
{
diff --git a/src/arch/power/process.hh b/src/arch/power/process.hh
index 473b7e028..e02a30abd 100644
--- a/src/arch/power/process.hh
+++ b/src/arch/power/process.hh
@@ -35,6 +35,7 @@
#include <string>
#include <vector>
+
#include "sim/process.hh"
class LiveProcess;
diff --git a/src/arch/power/tlb.hh b/src/arch/power/tlb.hh
index c4e3fadaa..590477b6a 100644
--- a/src/arch/power/tlb.hh
+++ b/src/arch/power/tlb.hh
@@ -40,9 +40,9 @@
#include <map>
#include "arch/power/isa_traits.hh"
+#include "arch/power/pagetable.hh"
#include "arch/power/utility.hh"
#include "arch/power/vtophys.hh"
-#include "arch/power/pagetable.hh"
#include "base/statistics.hh"
#include "mem/request.hh"
#include "params/PowerTLB.hh"
diff --git a/src/arch/power/vtophys.hh b/src/arch/power/vtophys.hh
index 8b88c9215..7371f38a6 100644
--- a/src/arch/power/vtophys.hh
+++ b/src/arch/power/vtophys.hh
@@ -39,7 +39,6 @@
#include "arch/power/isa_traits.hh"
#include "arch/power/utility.hh"
-
class ThreadContext;
class FunctionalPort;
diff --git a/src/arch/sparc/isa.hh b/src/arch/sparc/isa.hh
index 660f0c49d..f00068bbc 100644
--- a/src/arch/sparc/isa.hh
+++ b/src/arch/sparc/isa.hh
@@ -31,14 +31,14 @@
#ifndef __ARCH_SPARC_ISA_HH__
#define __ARCH_SPARC_ISA_HH__
+#include <ostream>
+#include <string>
+
#include "arch/sparc/registers.hh"
#include "arch/sparc/types.hh"
#include "config/full_system.hh"
#include "cpu/cpuevent.hh"
-#include <string>
-#include <ostream>
-
class Checkpoint;
class EventManager;
class ThreadContext;
diff --git a/src/arch/sparc/isa/includes.isa b/src/arch/sparc/isa/includes.isa
index bc9273ad3..8ef753d2e 100644
--- a/src/arch/sparc/isa/includes.isa
+++ b/src/arch/sparc/isa/includes.isa
@@ -35,8 +35,8 @@
output header {{
#include <cstring>
-#include <sstream>
#include <iostream>
+#include <sstream>
#include "arch/sparc/faults.hh"
#include "arch/sparc/isa_traits.hh"
@@ -49,14 +49,14 @@ output header {{
}};
output decoder {{
-#include "base/cprintf.hh"
+#include <algorithm>
+
#include "base/loader/symtab.hh"
+#include "base/cprintf.hh"
+#include "base/fenv.hh"
#include "cpu/thread_context.hh" // for Jump::branchTarget()
#include "mem/packet.hh"
-#include "base/fenv.hh"
-#include <algorithm>
-
using namespace SparcISA;
}};
@@ -67,16 +67,16 @@ output exec {{
#include "sim/pseudo_inst.hh"
#endif
+#include <cmath>
#include <limits>
-#include <cmath>
#include "arch/sparc/asi.hh"
#include "base/bigint.hh"
#include "cpu/base.hh"
#include "cpu/exetrace.hh"
-#include "sim/sim_exit.hh"
#include "mem/packet.hh"
#include "mem/packet_access.hh"
+#include "sim/sim_exit.hh"
using namespace SparcISA;
using namespace std;
diff --git a/src/arch/sparc/isa_traits.hh b/src/arch/sparc/isa_traits.hh
index 719127641..6992cfee1 100644
--- a/src/arch/sparc/isa_traits.hh
+++ b/src/arch/sparc/isa_traits.hh
@@ -32,8 +32,8 @@
#ifndef __ARCH_SPARC_ISA_TRAITS_HH__
#define __ARCH_SPARC_ISA_TRAITS_HH__
-#include "arch/sparc/types.hh"
#include "arch/sparc/sparc_traits.hh"
+#include "arch/sparc/types.hh"
#include "base/types.hh"
#include "config/full_system.hh"
diff --git a/src/arch/sparc/linux/linux.cc b/src/arch/sparc/linux/linux.cc
index 102e5af3b..6f8a05750 100644
--- a/src/arch/sparc/linux/linux.cc
+++ b/src/arch/sparc/linux/linux.cc
@@ -28,9 +28,10 @@
* Authors: Gabe Black
*/
-#include "arch/sparc/linux/linux.hh"
#include <fcntl.h>
+#include "arch/sparc/linux/linux.hh"
+
// open(2) flags translation table
OpenFlagTransTable SparcLinux::openFlagTable[] = {
#ifdef _MSC_VER
diff --git a/src/arch/sparc/linux/process.cc b/src/arch/sparc/linux/process.cc
index 2c9fe2ac0..ce6094060 100644
--- a/src/arch/sparc/linux/process.cc
+++ b/src/arch/sparc/linux/process.cc
@@ -30,14 +30,12 @@
* Ali Saidi
*/
-#include "arch/sparc/isa_traits.hh"
#include "arch/sparc/linux/process.hh"
+#include "arch/sparc/isa_traits.hh"
#include "arch/sparc/registers.hh"
-
#include "base/trace.hh"
#include "cpu/thread_context.hh"
#include "kern/linux/linux.hh"
-
#include "sim/process.hh"
#include "sim/syscall_emul.hh"
diff --git a/src/arch/sparc/locked_mem.hh b/src/arch/sparc/locked_mem.hh
index 291b2f422..556fbbdd9 100644
--- a/src/arch/sparc/locked_mem.hh
+++ b/src/arch/sparc/locked_mem.hh
@@ -39,7 +39,6 @@
#include "mem/request.hh"
-
namespace SparcISA
{
template <class XC>
diff --git a/src/arch/sparc/mmapped_ipr.hh b/src/arch/sparc/mmapped_ipr.hh
index 777242e7c..28e3ec259 100644
--- a/src/arch/sparc/mmapped_ipr.hh
+++ b/src/arch/sparc/mmapped_ipr.hh
@@ -37,11 +37,10 @@
* ISA-specific helper functions for memory mapped IPR accesses.
*/
+#include "arch/sparc/tlb.hh"
#include "config/full_system.hh"
#include "cpu/thread_context.hh"
#include "mem/packet.hh"
-#include "arch/sparc/tlb.hh"
-
namespace SparcISA
{
diff --git a/src/arch/sparc/nativetrace.cc b/src/arch/sparc/nativetrace.cc
index 7d8b96dc1..8987aa518 100644
--- a/src/arch/sparc/nativetrace.cc
+++ b/src/arch/sparc/nativetrace.cc
@@ -29,8 +29,8 @@
*/
#include "arch/sparc/isa_traits.hh"
-#include "arch/sparc/registers.hh"
#include "arch/sparc/nativetrace.hh"
+#include "arch/sparc/registers.hh"
#include "cpu/thread_context.hh"
#include "params/SparcNativeTrace.hh"
#include "sim/byteswap.hh"
diff --git a/src/arch/sparc/process.cc b/src/arch/sparc/process.cc
index ac42ccf64..bd3db92b6 100644
--- a/src/arch/sparc/process.cc
+++ b/src/arch/sparc/process.cc
@@ -32,16 +32,16 @@
#include "arch/sparc/asi.hh"
#include "arch/sparc/handlers.hh"
#include "arch/sparc/isa_traits.hh"
-#include "arch/sparc/registers.hh"
#include "arch/sparc/process.hh"
+#include "arch/sparc/registers.hh"
#include "arch/sparc/types.hh"
-#include "base/loader/object_file.hh"
#include "base/loader/elf_object.hh"
+#include "base/loader/object_file.hh"
#include "base/misc.hh"
#include "cpu/thread_context.hh"
#include "mem/page_table.hh"
-#include "sim/process_impl.hh"
#include "mem/translating_port.hh"
+#include "sim/process_impl.hh"
#include "sim/system.hh"
using namespace std;
diff --git a/src/arch/sparc/process.hh b/src/arch/sparc/process.hh
index 4ad8bb804..a9a4247fc 100644
--- a/src/arch/sparc/process.hh
+++ b/src/arch/sparc/process.hh
@@ -34,6 +34,7 @@
#include <string>
#include <vector>
+
#include "sim/byteswap.hh"
#include "sim/process.hh"
diff --git a/src/arch/sparc/remote_gdb.cc b/src/arch/sparc/remote_gdb.cc
index 932123548..86c287237 100644
--- a/src/arch/sparc/remote_gdb.cc
+++ b/src/arch/sparc/remote_gdb.cc
@@ -117,19 +117,19 @@
*/
#include <sys/signal.h>
+#include <unistd.h>
#include <string>
-#include <unistd.h>
-#include "arch/vtophys.hh"
#include "arch/sparc/remote_gdb.hh"
+#include "arch/vtophys.hh"
#include "base/intmath.hh"
#include "base/remote_gdb.hh"
#include "base/socket.hh"
#include "base/trace.hh"
#include "config/full_system.hh"
-#include "cpu/thread_context.hh"
#include "cpu/static_inst.hh"
+#include "cpu/thread_context.hh"
#include "mem/page_table.hh"
#include "mem/physical.hh"
#include "mem/port.hh"
diff --git a/src/arch/sparc/remote_gdb.hh b/src/arch/sparc/remote_gdb.hh
index 06f6b3896..6ada8bdca 100644
--- a/src/arch/sparc/remote_gdb.hh
+++ b/src/arch/sparc/remote_gdb.hh
@@ -34,9 +34,9 @@
#include <map>
#include "arch/sparc/types.hh"
+#include "base/pollevent.hh"
#include "base/remote_gdb.hh"
#include "cpu/pc_event.hh"
-#include "base/pollevent.hh"
class System;
class ThreadContext;
diff --git a/src/arch/sparc/solaris/process.cc b/src/arch/sparc/solaris/process.cc
index 24abd8687..e47377d42 100644
--- a/src/arch/sparc/solaris/process.cc
+++ b/src/arch/sparc/solaris/process.cc
@@ -28,14 +28,12 @@
* Authors: Ali Saidi
*/
-#include "arch/sparc/isa_traits.hh"
#include "arch/sparc/solaris/process.hh"
+#include "arch/sparc/isa_traits.hh"
#include "arch/sparc/registers.hh"
-
#include "base/trace.hh"
#include "cpu/thread_context.hh"
#include "kern/solaris/solaris.hh"
-
#include "sim/process.hh"
#include "sim/syscall_emul.hh"
diff --git a/src/arch/sparc/solaris/solaris.cc b/src/arch/sparc/solaris/solaris.cc
index 3cc910005..5474d8b17 100644
--- a/src/arch/sparc/solaris/solaris.cc
+++ b/src/arch/sparc/solaris/solaris.cc
@@ -28,10 +28,10 @@
* Authors: Ali Saidi
*/
-#include "arch/sparc/solaris/solaris.hh"
-
#include <fcntl.h>
+#include "arch/sparc/solaris/solaris.hh"
+
// open(2) flags translation table
OpenFlagTransTable SparcSolaris::openFlagTable[] = {
#ifdef _MSC_VER
diff --git a/src/arch/sparc/system.cc b/src/arch/sparc/system.cc
index e4ee3cacb..9988702d2 100644
--- a/src/arch/sparc/system.cc
+++ b/src/arch/sparc/system.cc
@@ -37,7 +37,6 @@
#include "params/SparcSystem.hh"
#include "sim/byteswap.hh"
-
using namespace BigEndianGuest;
SparcSystem::SparcSystem(Params *p)
diff --git a/src/arch/sparc/tlb.cc b/src/arch/sparc/tlb.cc
index 8aa007168..8742cfd32 100644
--- a/src/arch/sparc/tlb.cc
+++ b/src/arch/sparc/tlb.cc
@@ -36,8 +36,8 @@
#include "arch/sparc/tlb.hh"
#include "base/bitfield.hh"
#include "base/trace.hh"
-#include "cpu/thread_context.hh"
#include "cpu/base.hh"
+#include "cpu/thread_context.hh"
#include "mem/packet_access.hh"
#include "mem/request.hh"
#include "sim/system.hh"
diff --git a/src/arch/sparc/tlb_map.hh b/src/arch/sparc/tlb_map.hh
index 133443d5b..5541ff7e9 100644
--- a/src/arch/sparc/tlb_map.hh
+++ b/src/arch/sparc/tlb_map.hh
@@ -31,9 +31,10 @@
#ifndef __ARCH_SPARC_TLB_MAP_HH__
#define __ARCH_SPARC_TLB_MAP_HH__
-#include "arch/sparc/pagetable.hh"
#include <map>
+#include "arch/sparc/pagetable.hh"
+
namespace SparcISA
{
diff --git a/src/arch/sparc/types.hh b/src/arch/sparc/types.hh
index acc4e4a64..7d0a7617c 100644
--- a/src/arch/sparc/types.hh
+++ b/src/arch/sparc/types.hh
@@ -31,9 +31,9 @@
#ifndef __ARCH_SPARC_TYPES_HH__
#define __ARCH_SPARC_TYPES_HH__
+#include "arch/generic/types.hh"
#include "base/bigint.hh"
#include "base/types.hh"
-#include "arch/generic/types.hh"
namespace SparcISA
{
diff --git a/src/arch/sparc/utility.hh b/src/arch/sparc/utility.hh
index d69b42d01..b702e6838 100644
--- a/src/arch/sparc/utility.hh
+++ b/src/arch/sparc/utility.hh
@@ -34,8 +34,8 @@
#include "arch/sparc/isa_traits.hh"
#include "arch/sparc/registers.hh"
#include "arch/sparc/tlb.hh"
-#include "base/misc.hh"
#include "base/bitfield.hh"
+#include "base/misc.hh"
#include "cpu/static_inst.hh"
#include "cpu/thread_context.hh"
#include "sim/fault_fwd.hh"
diff --git a/src/arch/sparc/vtophys.cc b/src/arch/sparc/vtophys.cc
index 36b2557e7..c8f35fe8b 100644
--- a/src/arch/sparc/vtophys.cc
+++ b/src/arch/sparc/vtophys.cc
@@ -30,10 +30,10 @@
#include <string>
-#include "arch/sparc/vtophys.hh"
#include "arch/sparc/tlb.hh"
-#include "base/compiler.hh"
+#include "arch/sparc/vtophys.hh"
#include "base/chunk_generator.hh"
+#include "base/compiler.hh"
#include "base/trace.hh"
#include "cpu/thread_context.hh"
#include "mem/vport.hh"
diff --git a/src/arch/x86/bios/acpi.cc b/src/arch/x86/bios/acpi.cc
index 8d39236d4..4382a3d6b 100644
--- a/src/arch/x86/bios/acpi.cc
+++ b/src/arch/x86/bios/acpi.cc
@@ -39,14 +39,12 @@
#include "arch/x86/bios/acpi.hh"
#include "mem/port.hh"
-#include "sim/byteswap.hh"
-#include "sim/sim_object.hh"
-
#include "params/X86ACPIRSDP.hh"
-
-#include "params/X86ACPISysDescTable.hh"
#include "params/X86ACPIRSDT.hh"
+#include "params/X86ACPISysDescTable.hh"
#include "params/X86ACPIXSDT.hh"
+#include "sim/byteswap.hh"
+#include "sim/sim_object.hh"
using namespace std;
diff --git a/src/arch/x86/bios/intelmp.hh b/src/arch/x86/bios/intelmp.hh
index 64c1e18c9..117466b48 100644
--- a/src/arch/x86/bios/intelmp.hh
+++ b/src/arch/x86/bios/intelmp.hh
@@ -44,13 +44,12 @@
#include <vector>
#include "base/bitfield.hh"
-#include "sim/sim_object.hh"
-
#include "enums/X86IntelMPAddressType.hh"
#include "enums/X86IntelMPInterruptType.hh"
#include "enums/X86IntelMPPolarity.hh"
#include "enums/X86IntelMPRangeList.hh"
#include "enums/X86IntelMPTriggerMode.hh"
+#include "sim/sim_object.hh"
class FunctionalPort;
diff --git a/src/arch/x86/emulenv.hh b/src/arch/x86/emulenv.hh
index a745fb539..ac707d808 100644
--- a/src/arch/x86/emulenv.hh
+++ b/src/arch/x86/emulenv.hh
@@ -40,9 +40,9 @@
#ifndef __ARCH_X86_EMULENV_HH__
#define __ARCH_X86_EMULENV_HH__
-#include "arch/x86/registers.hh"
#include "arch/x86/regs/int.hh"
#include "arch/x86/regs/segment.hh"
+#include "arch/x86/registers.hh"
#include "arch/x86/types.hh"
namespace X86ISA
diff --git a/src/arch/x86/faults.hh b/src/arch/x86/faults.hh
index 7682953c1..2e8889404 100644
--- a/src/arch/x86/faults.hh
+++ b/src/arch/x86/faults.hh
@@ -40,13 +40,13 @@
#ifndef __ARCH_X86_FAULTS_HH__
#define __ARCH_X86_FAULTS_HH__
+#include <string>
+
#include "base/bitunion.hh"
#include "base/misc.hh"
#include "sim/faults.hh"
#include "sim/tlb.hh"
-#include <string>
-
namespace X86ISA
{
// Base class for all x86 "faults" where faults is in the m5 sense
diff --git a/src/arch/x86/insts/badmicroop.cc b/src/arch/x86/insts/badmicroop.cc
index ef493f250..d03a5eba8 100644
--- a/src/arch/x86/insts/badmicroop.cc
+++ b/src/arch/x86/insts/badmicroop.cc
@@ -38,8 +38,8 @@
*/
#include "arch/x86/insts/badmicroop.hh"
-#include "arch/x86/isa_traits.hh"
#include "arch/x86/decoder.hh"
+#include "arch/x86/isa_traits.hh"
namespace X86ISA
{
diff --git a/src/arch/x86/insts/macroop.hh b/src/arch/x86/insts/macroop.hh
index 4f4176b77..d12ff0d8f 100644
--- a/src/arch/x86/insts/macroop.hh
+++ b/src/arch/x86/insts/macroop.hh
@@ -40,10 +40,10 @@
#ifndef __ARCH_X86_INSTS_MACROOP_HH__
#define __ARCH_X86_INSTS_MACROOP_HH__
-#include "arch/x86/emulenv.hh"
#include "arch/x86/insts/badmicroop.hh"
-#include "arch/x86/types.hh"
#include "arch/x86/insts/static_inst.hh"
+#include "arch/x86/emulenv.hh"
+#include "arch/x86/types.hh"
namespace X86ISA
{
diff --git a/src/arch/x86/insts/microfpop.cc b/src/arch/x86/insts/microfpop.cc
index 94194974a..000cbf635 100644
--- a/src/arch/x86/insts/microfpop.cc
+++ b/src/arch/x86/insts/microfpop.cc
@@ -37,9 +37,10 @@
* Authors: Gabe Black
*/
+#include <string>
+
#include "arch/x86/insts/microfpop.hh"
#include "arch/x86/regs/misc.hh"
-#include <string>
namespace X86ISA
{
diff --git a/src/arch/x86/insts/microldstop.cc b/src/arch/x86/insts/microldstop.cc
index 6d09a4baf..4fc0ec8e3 100644
--- a/src/arch/x86/insts/microldstop.cc
+++ b/src/arch/x86/insts/microldstop.cc
@@ -37,9 +37,10 @@
* Authors: Gabe Black
*/
-#include "arch/x86/insts/microldstop.hh"
#include <string>
+#include "arch/x86/insts/microldstop.hh"
+
namespace X86ISA
{
std::string LdStOp::generateDisassembly(Addr pc,
diff --git a/src/arch/x86/insts/micromediaop.cc b/src/arch/x86/insts/micromediaop.cc
index 2ed5df184..fa4d3a473 100644
--- a/src/arch/x86/insts/micromediaop.cc
+++ b/src/arch/x86/insts/micromediaop.cc
@@ -28,9 +28,10 @@
* Authors: Gabe Black
*/
+#include <string>
+
#include "arch/x86/insts/micromediaop.hh"
#include "arch/x86/regs/misc.hh"
-#include <string>
namespace X86ISA
{
diff --git a/src/arch/x86/interrupts.cc b/src/arch/x86/interrupts.cc
index 837c802ec..c45b0c344 100644
--- a/src/arch/x86/interrupts.cc
+++ b/src/arch/x86/interrupts.cc
@@ -37,9 +37,9 @@
* Authors: Gabe Black
*/
+#include "arch/x86/regs/apic.hh"
#include "arch/x86/interrupts.hh"
#include "arch/x86/intmessage.hh"
-#include "arch/x86/regs/apic.hh"
#include "cpu/base.hh"
#include "dev/x86/i82094aa.hh"
#include "dev/x86/pc.hh"
diff --git a/src/arch/x86/interrupts.hh b/src/arch/x86/interrupts.hh
index e45610ec7..f5d86219b 100644
--- a/src/arch/x86/interrupts.hh
+++ b/src/arch/x86/interrupts.hh
@@ -40,13 +40,13 @@
#ifndef __ARCH_X86_INTERRUPTS_HH__
#define __ARCH_X86_INTERRUPTS_HH__
+#include "arch/x86/regs/apic.hh"
#include "arch/x86/faults.hh"
#include "arch/x86/intmessage.hh"
-#include "arch/x86/regs/apic.hh"
#include "base/bitfield.hh"
#include "cpu/thread_context.hh"
-#include "dev/io_device.hh"
#include "dev/x86/intdev.hh"
+#include "dev/io_device.hh"
#include "params/X86LocalApic.hh"
#include "sim/eventq.hh"
diff --git a/src/arch/x86/isa.hh b/src/arch/x86/isa.hh
index c6dea8876..463a249a4 100644
--- a/src/arch/x86/isa.hh
+++ b/src/arch/x86/isa.hh
@@ -31,14 +31,14 @@
#ifndef __ARCH_X86_ISA_HH__
#define __ARCH_X86_ISA_HH__
-#include "arch/x86/registers.hh"
+#include <iostream>
+#include <string>
+
#include "arch/x86/regs/float.hh"
#include "arch/x86/regs/misc.hh"
+#include "arch/x86/registers.hh"
#include "base/types.hh"
-#include <string>
-#include <iostream>
-
class Checkpoint;
class EventManager;
class ThreadContext;
diff --git a/src/arch/x86/isa/includes.isa b/src/arch/x86/isa/includes.isa
index 674e69e98..6f4c4008e 100644
--- a/src/arch/x86/isa/includes.isa
+++ b/src/arch/x86/isa/includes.isa
@@ -50,17 +50,17 @@ let {{
output header {{
#include <cstring>
-#include <sstream>
#include <iostream>
+#include <sstream>
#include "arch/generic/debugfaults.hh"
-#include "arch/x86/emulenv.hh"
#include "arch/x86/insts/macroop.hh"
#include "arch/x86/insts/microfpop.hh"
#include "arch/x86/insts/microldstop.hh"
#include "arch/x86/insts/micromediaop.hh"
#include "arch/x86/insts/microregop.hh"
#include "arch/x86/insts/static_inst.hh"
+#include "arch/x86/emulenv.hh"
#include "arch/x86/isa_traits.hh"
#include "arch/x86/registers.hh"
#include "arch/x86/types.hh"
@@ -73,14 +73,14 @@ using X86ISA::InstRegIndex;
}};
output decoder {{
-#include "arch/x86/faults.hh"
-#include "arch/x86/microcode_rom.hh"
#include "arch/x86/regs/float.hh"
#include "arch/x86/regs/misc.hh"
#include "arch/x86/regs/segment.hh"
+#include "arch/x86/faults.hh"
+#include "arch/x86/microcode_rom.hh"
#include "arch/x86/tlb.hh"
-#include "base/cprintf.hh"
#include "base/loader/symtab.hh"
+#include "base/cprintf.hh"
#include "base/misc.hh"
#include "cpu/thread_context.hh" // for Jump::branchTarget()
#include "mem/packet.hh"
@@ -106,23 +106,23 @@ output exec {{
#include "sim/pseudo_inst.hh"
#endif
+#include <cmath>
#include <limits>
-#include <cmath>
+#include "arch/x86/regs/misc.hh"
#include "arch/x86/cpuid.hh"
#include "arch/x86/faults.hh"
-#include "arch/x86/regs/misc.hh"
#include "arch/x86/tlb.hh"
#include "base/bigint.hh"
#include "base/compiler.hh"
#include "base/condcodes.hh"
#include "cpu/base.hh"
#include "cpu/exetrace.hh"
-#include "sim/sim_exit.hh"
#include "mem/packet.hh"
#include "mem/packet_access.hh"
#include "mem/request.hh"
#include "sim/pseudo_inst.hh"
+#include "sim/sim_exit.hh"
using namespace X86ISA;
using namespace std;
diff --git a/src/arch/x86/linux/linux.cc b/src/arch/x86/linux/linux.cc
index 0d9d7b676..590af0e40 100644
--- a/src/arch/x86/linux/linux.cc
+++ b/src/arch/x86/linux/linux.cc
@@ -37,9 +37,10 @@
* Authors: Gabe Black
*/
-#include "arch/x86/linux/linux.hh"
#include <fcntl.h>
+#include "arch/x86/linux/linux.hh"
+
// open(2) flags translation table
OpenFlagTransTable X86Linux64::openFlagTable[] = {
#ifdef _MSC_VER
diff --git a/src/arch/x86/linux/process.cc b/src/arch/x86/linux/process.cc
index 4f7967424..2e665072b 100644
--- a/src/arch/x86/linux/process.cc
+++ b/src/arch/x86/linux/process.cc
@@ -37,14 +37,12 @@
* Authors: Gabe Black
*/
-#include "arch/x86/isa_traits.hh"
#include "arch/x86/linux/process.hh"
+#include "arch/x86/isa_traits.hh"
#include "arch/x86/registers.hh"
-
#include "base/trace.hh"
#include "cpu/thread_context.hh"
#include "kern/linux/linux.hh"
-
#include "sim/process.hh"
using namespace std;
diff --git a/src/arch/x86/linux/process.hh b/src/arch/x86/linux/process.hh
index 20012d960..789c2925a 100644
--- a/src/arch/x86/linux/process.hh
+++ b/src/arch/x86/linux/process.hh
@@ -40,9 +40,9 @@
#ifndef __X86_LINUX_PROCESS_HH__
#define __X86_LINUX_PROCESS_HH__
-#include "sim/process.hh"
#include "arch/x86/linux/linux.hh"
#include "arch/x86/process.hh"
+#include "sim/process.hh"
namespace X86ISA {
diff --git a/src/arch/x86/linux/syscalls.cc b/src/arch/x86/linux/syscalls.cc
index 87cddba4d..5ccb14394 100644
--- a/src/arch/x86/linux/syscalls.cc
+++ b/src/arch/x86/linux/syscalls.cc
@@ -37,8 +37,8 @@
* Authors: Gabe Black
*/
-#include "arch/x86/linux/process.hh"
#include "arch/x86/linux/linux.hh"
+#include "arch/x86/linux/process.hh"
#include "arch/x86/regs/misc.hh"
#include "kern/linux/linux.hh"
#include "sim/syscall_emul.hh"
diff --git a/src/arch/x86/linux/system.cc b/src/arch/x86/linux/system.cc
index f750019a8..104f93372 100644
--- a/src/arch/x86/linux/system.cc
+++ b/src/arch/x86/linux/system.cc
@@ -37,9 +37,9 @@
* Authors: Gabe Black
*/
-#include "arch/x86/isa_traits.hh"
#include "arch/x86/linux/system.hh"
#include "arch/x86/regs/int.hh"
+#include "arch/x86/isa_traits.hh"
#include "arch/vtophys.hh"
#include "base/trace.hh"
#include "cpu/thread_context.hh"
@@ -47,7 +47,6 @@
#include "params/LinuxX86System.hh"
#include "sim/byteswap.hh"
-
using namespace LittleEndianGuest;
using namespace X86ISA;
diff --git a/src/arch/x86/linux/system.hh b/src/arch/x86/linux/system.hh
index ae7e93f3d..e8adba9f2 100644
--- a/src/arch/x86/linux/system.hh
+++ b/src/arch/x86/linux/system.hh
@@ -43,9 +43,9 @@
#include <string>
#include <vector>
-#include "params/LinuxX86System.hh"
#include "arch/x86/bios/e820.hh"
#include "arch/x86/system.hh"
+#include "params/LinuxX86System.hh"
class LinuxX86System : public X86System
{
diff --git a/src/arch/x86/microcode_rom.hh b/src/arch/x86/microcode_rom.hh
index 84c503bb9..4a35e06a3 100644
--- a/src/arch/x86/microcode_rom.hh
+++ b/src/arch/x86/microcode_rom.hh
@@ -31,8 +31,8 @@
#ifndef __ARCH_X86_MICROCODE_ROM_HH__
#define __ARCH_X86_MICROCODE_ROM_HH__
-#include "arch/x86/emulenv.hh"
#include "arch/x86/insts/badmicroop.hh"
+#include "arch/x86/emulenv.hh"
#include "cpu/static_inst.hh"
namespace X86ISAInst
diff --git a/src/arch/x86/nativetrace.cc b/src/arch/x86/nativetrace.cc
index d1d75387d..3dd5890bc 100644
--- a/src/arch/x86/nativetrace.cc
+++ b/src/arch/x86/nativetrace.cc
@@ -28,10 +28,10 @@
* Authors: Gabe Black
*/
-#include "arch/x86/isa_traits.hh"
-#include "arch/x86/nativetrace.hh"
#include "arch/x86/regs/float.hh"
#include "arch/x86/regs/int.hh"
+#include "arch/x86/isa_traits.hh"
+#include "arch/x86/nativetrace.hh"
#include "cpu/thread_context.hh"
#include "params/X86NativeTrace.hh"
#include "sim/byteswap.hh"
diff --git a/src/arch/x86/pagetable_walker.cc b/src/arch/x86/pagetable_walker.cc
index 234ea5961..835cc69ad 100644
--- a/src/arch/x86/pagetable_walker.cc
+++ b/src/arch/x86/pagetable_walker.cc
@@ -42,8 +42,8 @@
#include "arch/x86/tlb.hh"
#include "arch/x86/vtophys.hh"
#include "base/bitfield.hh"
-#include "cpu/thread_context.hh"
#include "cpu/base.hh"
+#include "cpu/thread_context.hh"
#include "mem/packet_access.hh"
#include "mem/request.hh"
#include "sim/system.hh"
diff --git a/src/arch/x86/pagetable_walker.hh b/src/arch/x86/pagetable_walker.hh
index 007c577ae..b0edc434f 100644
--- a/src/arch/x86/pagetable_walker.hh
+++ b/src/arch/x86/pagetable_walker.hh
@@ -44,8 +44,8 @@
#include "arch/x86/pagetable.hh"
#include "arch/x86/tlb.hh"
-#include "base/types.hh"
#include "base/fast_alloc.hh"
+#include "base/types.hh"
#include "mem/mem_object.hh"
#include "mem/packet.hh"
#include "params/X86PagetableWalker.hh"
diff --git a/src/arch/x86/predecoder.hh b/src/arch/x86/predecoder.hh
index 5c67e28e1..f0d9cda81 100644
--- a/src/arch/x86/predecoder.hh
+++ b/src/arch/x86/predecoder.hh
@@ -42,8 +42,8 @@
#include <cassert>
-#include "arch/x86/types.hh"
#include "arch/x86/regs/misc.hh"
+#include "arch/x86/types.hh"
#include "base/bitfield.hh"
#include "base/misc.hh"
#include "base/trace.hh"
diff --git a/src/arch/x86/process.cc b/src/arch/x86/process.cc
index bb875686e..693a8fabe 100644
--- a/src/arch/x86/process.cc
+++ b/src/arch/x86/process.cc
@@ -41,13 +41,13 @@
* Ali Saidi
*/
-#include "arch/x86/isa_traits.hh"
-#include "arch/x86/process.hh"
#include "arch/x86/regs/misc.hh"
#include "arch/x86/regs/segment.hh"
+#include "arch/x86/isa_traits.hh"
+#include "arch/x86/process.hh"
#include "arch/x86/types.hh"
-#include "base/loader/object_file.hh"
#include "base/loader/elf_object.hh"
+#include "base/loader/object_file.hh"
#include "base/misc.hh"
#include "base/trace.hh"
#include "cpu/thread_context.hh"
diff --git a/src/arch/x86/process.hh b/src/arch/x86/process.hh
index 34275b2d3..98e17715a 100644
--- a/src/arch/x86/process.hh
+++ b/src/arch/x86/process.hh
@@ -42,6 +42,7 @@
#include <string>
#include <vector>
+
#include "sim/process.hh"
class SyscallDesc;
diff --git a/src/arch/x86/registers.hh b/src/arch/x86/registers.hh
index 5882132e5..c3bda5a19 100644
--- a/src/arch/x86/registers.hh
+++ b/src/arch/x86/registers.hh
@@ -40,9 +40,9 @@
#ifndef __ARCH_X86_REGISTERS_HH__
#define __ARCH_X86_REGISTERS_HH__
-#include "arch/x86/max_inst_regs.hh"
#include "arch/x86/regs/int.hh"
#include "arch/x86/regs/misc.hh"
+#include "arch/x86/max_inst_regs.hh"
#include "arch/x86/x86_traits.hh"
namespace X86ISA
diff --git a/src/arch/x86/remote_gdb.cc b/src/arch/x86/remote_gdb.cc
index 9985374d0..8db7a6088 100644
--- a/src/arch/x86/remote_gdb.cc
+++ b/src/arch/x86/remote_gdb.cc
@@ -38,12 +38,12 @@
*/
#include <sys/signal.h>
+#include <unistd.h>
#include <string>
-#include <unistd.h>
-#include "arch/vtophys.hh"
#include "arch/x86/remote_gdb.hh"
+#include "arch/vtophys.hh"
#include "base/remote_gdb.hh"
#include "base/socket.hh"
#include "base/trace.hh"
diff --git a/src/arch/x86/system.cc b/src/arch/x86/system.cc
index 20ee484fb..d287e3947 100644
--- a/src/arch/x86/system.cc
+++ b/src/arch/x86/system.cc
@@ -37,22 +37,21 @@
* Authors: Gabe Black
*/
-#include "arch/x86/bios/smbios.hh"
#include "arch/x86/bios/intelmp.hh"
-#include "arch/x86/isa_traits.hh"
+#include "arch/x86/bios/smbios.hh"
#include "arch/x86/regs/misc.hh"
+#include "arch/x86/isa_traits.hh"
#include "arch/x86/system.hh"
#include "arch/vtophys.hh"
-#include "base/intmath.hh"
#include "base/loader/object_file.hh"
#include "base/loader/symtab.hh"
+#include "base/intmath.hh"
#include "base/trace.hh"
#include "cpu/thread_context.hh"
#include "mem/physical.hh"
#include "params/X86System.hh"
#include "sim/byteswap.hh"
-
using namespace LittleEndianGuest;
using namespace X86ISA;
diff --git a/src/arch/x86/tlb.cc b/src/arch/x86/tlb.cc
index ac32e86d7..f5e73dcee 100644
--- a/src/arch/x86/tlb.cc
+++ b/src/arch/x86/tlb.cc
@@ -39,19 +39,17 @@
#include <cstring>
-#include "config/full_system.hh"
-
-#include "arch/x86/faults.hh"
#include "arch/x86/insts/microldstop.hh"
-#include "arch/x86/pagetable.hh"
#include "arch/x86/regs/misc.hh"
+#include "arch/x86/faults.hh"
+#include "arch/x86/pagetable.hh"
#include "arch/x86/tlb.hh"
#include "arch/x86/x86_traits.hh"
#include "base/bitfield.hh"
#include "base/trace.hh"
#include "config/full_system.hh"
-#include "cpu/thread_context.hh"
#include "cpu/base.hh"
+#include "cpu/thread_context.hh"
#include "mem/packet_access.hh"
#include "mem/request.hh"
diff --git a/src/arch/x86/tlb.hh b/src/arch/x86/tlb.hh
index 965d331ba..e4ea0e1b7 100644
--- a/src/arch/x86/tlb.hh
+++ b/src/arch/x86/tlb.hh
@@ -41,18 +41,18 @@
#define __ARCH_X86_TLB_HH__
#include <list>
-#include <vector>
#include <string>
+#include <vector>
-#include "arch/x86/pagetable.hh"
#include "arch/x86/regs/segment.hh"
+#include "arch/x86/pagetable.hh"
#include "config/full_system.hh"
#include "mem/mem_object.hh"
#include "mem/request.hh"
#include "params/X86TLB.hh"
#include "sim/fault_fwd.hh"
-#include "sim/tlb.hh"
#include "sim/sim_object.hh"
+#include "sim/tlb.hh"
class ThreadContext;
class Packet;
diff --git a/src/base/cp_annotate.cc b/src/base/cp_annotate.cc
index 69b926b29..118c6bf36 100644
--- a/src/base/cp_annotate.cc
+++ b/src/base/cp_annotate.cc
@@ -28,11 +28,11 @@
* Authors: Ali Saidi
*/
-#include "arch/utility.hh"
#include "arch/alpha/linux/threadinfo.hh"
-#include "base/cp_annotate.hh"
-#include "base/callback.hh"
+#include "arch/utility.hh"
#include "base/loader/object_file.hh"
+#include "base/callback.hh"
+#include "base/cp_annotate.hh"
#include "base/output.hh"
#include "base/trace.hh"
#include "config/the_isa.hh"
diff --git a/src/base/cp_annotate.hh b/src/base/cp_annotate.hh
index fb955a380..3e4597ba8 100644
--- a/src/base/cp_annotate.hh
+++ b/src/base/cp_annotate.hh
@@ -31,13 +31,13 @@
#ifndef __BASE__CP_ANNOTATE_HH__
#define __BASE__CP_ANNOTATE_HH__
-#include <string>
#include <list>
-#include <vector>
#include <map>
+#include <string>
+#include <vector>
-#include "base/hashmap.hh"
#include "base/loader/symtab.hh"
+#include "base/hashmap.hh"
#include "base/trace.hh"
#include "base/types.hh"
#include "config/cp_annotate.hh"
diff --git a/src/base/cprintf.hh b/src/base/cprintf.hh
index cd5d642c1..6124d8c73 100644
--- a/src/base/cprintf.hh
+++ b/src/base/cprintf.hh
@@ -37,8 +37,8 @@
#include <list>
#include <string>
-#include "base/varargs.hh"
#include "base/cprintf_formats.hh"
+#include "base/varargs.hh"
namespace cp {
diff --git a/src/base/debug.cc b/src/base/debug.cc
index de201af18..1d7be5a9a 100644
--- a/src/base/debug.cc
+++ b/src/base/debug.cc
@@ -29,9 +29,10 @@
*/
#include <sys/types.h>
-#include <signal.h>
#include <unistd.h>
+#include <csignal>
+
#include "base/cprintf.hh"
void
diff --git a/src/base/fast_alloc.hh b/src/base/fast_alloc.hh
index 58043e51e..d6dc593d4 100644
--- a/src/base/fast_alloc.hh
+++ b/src/base/fast_alloc.hh
@@ -62,9 +62,9 @@
// collapse the destructor call chain back up the inheritance
// hierarchy.
-#include "config/no_fast_alloc.hh"
-#include "config/force_fast_alloc.hh"
#include "config/fast_alloc_stats.hh"
+#include "config/force_fast_alloc.hh"
+#include "config/no_fast_alloc.hh"
// By default, we want to enable FastAlloc in any build other than
// m5.debug. (FastAlloc's reuse policies can mask allocation bugs, so
diff --git a/src/base/fenv.c b/src/base/fenv.c
index 2ec2f796f..ed06e220d 100644
--- a/src/base/fenv.c
+++ b/src/base/fenv.c
@@ -29,8 +29,8 @@
*/
#include <assert.h>
-#include <stdlib.h>
#include <fenv.h>
+#include <stdlib.h>
void m5_fesetround(int rm);
int m5_fegetround();
diff --git a/src/base/hostinfo.cc b/src/base/hostinfo.cc
index ffc2f93ff..5ff34e603 100644
--- a/src/base/hostinfo.cc
+++ b/src/base/hostinfo.cc
@@ -28,12 +28,12 @@
* Authors: Nathan Binkert
*/
-#include <ctype.h>
-#include <errno.h>
-#include <math.h>
#include <unistd.h>
-#include <stdio.h>
+#include <cctype>
+#include <cerrno>
+#include <cmath>
+#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
diff --git a/src/base/inet.hh b/src/base/inet.hh
index ecb088289..a957b8a71 100644
--- a/src/base/inet.hh
+++ b/src/base/inet.hh
@@ -42,7 +42,6 @@
#include "base/range.hh"
#include "base/types.hh"
#include "dev/etherpkt.hh"
-
#include "dnet/os.h"
#include "dnet/eth.h"
#include "dnet/ip.h"
diff --git a/src/base/inifile.cc b/src/base/inifile.cc
index 24d0013c4..451198033 100644
--- a/src/base/inifile.cc
+++ b/src/base/inifile.cc
@@ -31,8 +31,8 @@
#include <fstream>
#include <iostream>
-#include <vector>
#include <string>
+#include <vector>
#include "base/inifile.hh"
#include "base/str.hh"
diff --git a/src/base/loader/aout_object.cc b/src/base/loader/aout_object.cc
index fe435a599..31a6a2868 100644
--- a/src/base/loader/aout_object.cc
+++ b/src/base/loader/aout_object.cc
@@ -31,9 +31,9 @@
#include <string>
#include "base/loader/aout_object.hh"
+#include "base/loader/exec_aout.h"
#include "base/loader/symtab.hh"
#include "base/trace.hh"
-#include "base/loader/exec_aout.h"
using namespace std;
diff --git a/src/base/loader/elf_object.cc b/src/base/loader/elf_object.cc
index a550d9765..22316c0d6 100644
--- a/src/base/loader/elf_object.cc
+++ b/src/base/loader/elf_object.cc
@@ -32,14 +32,13 @@
#include <cassert>
#include <string>
-#include "gelf.h"
-
-#include "base/bitfield.hh"
#include "base/loader/elf_object.hh"
#include "base/loader/symtab.hh"
+#include "base/bitfield.hh"
#include "base/misc.hh"
#include "base/trace.hh"
#include "sim/byteswap.hh"
+#include "gelf.h"
using namespace std;
diff --git a/src/base/loader/elf_object.hh b/src/base/loader/elf_object.hh
index a19e82b28..fe75927c5 100644
--- a/src/base/loader/elf_object.hh
+++ b/src/base/loader/elf_object.hh
@@ -31,10 +31,11 @@
#ifndef __ELF_OBJECT_HH__
#define __ELF_OBJECT_HH__
-#include "base/loader/object_file.hh"
#include <set>
#include <vector>
+#include "base/loader/object_file.hh"
+
class ElfObject : public ObjectFile
{
protected:
diff --git a/src/base/loader/hex_file.cc b/src/base/loader/hex_file.cc
index 61d6c8009..854834b2b 100755
--- a/src/base/loader/hex_file.cc
+++ b/src/base/loader/hex_file.cc
@@ -33,9 +33,9 @@
#include <list>
#include <string>
-#include "base/cprintf.hh"
#include "base/loader/hex_file.hh"
#include "base/loader/symtab.hh"
+#include "base/cprintf.hh"
#include "mem/translating_port.hh"
using namespace std;
diff --git a/src/base/loader/object_file.cc b/src/base/loader/object_file.cc
index 2273b6c4e..9dcbd7936 100644
--- a/src/base/loader/object_file.cc
+++ b/src/base/loader/object_file.cc
@@ -29,24 +29,22 @@
* Steve Reinhardt
*/
-#include <list>
-#include <string>
-
-#include <sys/types.h>
#include <sys/mman.h>
+#include <sys/types.h>
#include <fcntl.h>
-#include <stdio.h>
#include <unistd.h>
-#include "base/cprintf.hh"
-#include "base/loader/object_file.hh"
-#include "base/loader/symtab.hh"
+#include <cstdio>
+#include <list>
+#include <string>
-#include "base/loader/ecoff_object.hh"
#include "base/loader/aout_object.hh"
+#include "base/loader/ecoff_object.hh"
#include "base/loader/elf_object.hh"
+#include "base/loader/object_file.hh"
#include "base/loader/raw_object.hh"
-
+#include "base/loader/symtab.hh"
+#include "base/cprintf.hh"
#include "mem/translating_port.hh"
using namespace std;
diff --git a/src/base/loader/symtab.cc b/src/base/loader/symtab.cc
index 7163260ec..2c868a9b1 100644
--- a/src/base/loader/symtab.cc
+++ b/src/base/loader/symtab.cc
@@ -28,8 +28,8 @@
* Authors: Nathan Binkert
*/
-#include <iostream>
#include <fstream>
+#include <iostream>
#include <string>
#include <vector>
diff --git a/src/base/misc.cc b/src/base/misc.cc
index 94336c647..66896103f 100644
--- a/src/base/misc.cc
+++ b/src/base/misc.cc
@@ -28,10 +28,11 @@
* Authors: Nathan Binkert
*/
+#include <zlib.h>
+
#include <cstdlib>
#include <iostream>
#include <string>
-#include <zlib.h>
#include "base/cprintf.hh"
#include "base/hostinfo.hh"
diff --git a/src/base/mysql.hh b/src/base/mysql.hh
index c9051bd2b..c8ffba733 100644
--- a/src/base/mysql.hh
+++ b/src/base/mysql.hh
@@ -33,12 +33,13 @@
#define TO_BE_INCLUDED_LATER 0
+#include <mysql.h>
+#include <mysql_version.h>
+
#include <cassert>
#include <iosfwd>
-#include <mysql_version.h>
-#include <mysql.h>
-#include <string>
#include <sstream>
+#include <string>
namespace MySQL {
diff --git a/src/base/output.cc b/src/base/output.cc
index ea13e23d4..020247152 100644
--- a/src/base/output.cc
+++ b/src/base/output.cc
@@ -28,12 +28,12 @@
* Authors: Nathan Binkert
*/
-#include <errno.h>
-#include <limits.h>
-#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <cerrno>
+#include <climits>
+#include <cstdlib>
#include <fstream>
#include <gzstream.hh>
diff --git a/src/base/pollevent.cc b/src/base/pollevent.cc
index 7dcaa094d..67708c129 100644
--- a/src/base/pollevent.cc
+++ b/src/base/pollevent.cc
@@ -35,9 +35,10 @@
#endif
#include <fcntl.h>
-#include <signal.h>
#include <unistd.h>
+#include <csignal>
+
#include "base/misc.hh"
#include "base/pollevent.hh"
#include "base/types.hh"
diff --git a/src/base/pollevent.hh b/src/base/pollevent.hh
index ecaeb94ce..b9c833c8a 100644
--- a/src/base/pollevent.hh
+++ b/src/base/pollevent.hh
@@ -31,8 +31,10 @@
#ifndef __POLLEVENT_H__
#define __POLLEVENT_H__
-#include <vector>
#include <poll.h>
+
+#include <vector>
+
#include "sim/core.hh"
class Checkpoint;
diff --git a/src/base/range_map.hh b/src/base/range_map.hh
index 0ffc28ed9..7714a0049 100644
--- a/src/base/range_map.hh
+++ b/src/base/range_map.hh
@@ -31,10 +31,10 @@
#ifndef __BASE_RANGE_MAP_HH__
#define __BASE_RANGE_MAP_HH__
-#include "base/range.hh"
-
#include <map>
+#include "base/range.hh"
+
template <class T,class V>
class range_map
{
diff --git a/src/base/remote_gdb.cc b/src/base/remote_gdb.cc
index abc5f4ec0..02ee8e331 100644
--- a/src/base/remote_gdb.cc
+++ b/src/base/remote_gdb.cc
@@ -117,10 +117,10 @@
*/
#include <sys/signal.h>
+#include <unistd.h>
#include <cstdio>
#include <string>
-#include <unistd.h>
#include "config/full_system.hh"
@@ -134,8 +134,8 @@
#include "base/socket.hh"
#include "base/trace.hh"
#include "config/the_isa.hh"
-#include "cpu/thread_context.hh"
#include "cpu/static_inst.hh"
+#include "cpu/thread_context.hh"
#include "mem/port.hh"
#include "mem/translating_port.hh"
#include "sim/system.hh"
diff --git a/src/base/remote_gdb.hh b/src/base/remote_gdb.hh
index 92e599585..7c1228e59 100644
--- a/src/base/remote_gdb.hh
+++ b/src/base/remote_gdb.hh
@@ -31,13 +31,14 @@
#ifndef __REMOTE_GDB_HH__
#define __REMOTE_GDB_HH__
-#include <map>
#include <sys/signal.h>
+#include <map>
+
#include "arch/types.hh"
-#include "cpu/pc_event.hh"
#include "base/pollevent.hh"
#include "base/socket.hh"
+#include "cpu/pc_event.hh"
class System;
class ThreadContext;
diff --git a/src/base/socket.cc b/src/base/socket.cc
index 4ad8f5c93..0c8903084 100644
--- a/src/base/socket.cc
+++ b/src/base/socket.cc
@@ -28,18 +28,17 @@
* Authors: Nathan Binkert
*/
-#include <sys/types.h>
-#include <sys/socket.h>
-
#include <netinet/in.h>
#include <netinet/tcp.h>
-
-#include <errno.h>
+#include <sys/socket.h>
+#include <sys/types.h>
#include <unistd.h>
-#include "base/types.hh"
+#include <cerrno>
+
#include "base/misc.hh"
#include "base/socket.hh"
+#include "base/types.hh"
using namespace std;
diff --git a/src/base/statistics.cc b/src/base/statistics.cc
index 95402a221..5ee018b1c 100644
--- a/src/base/statistics.cc
+++ b/src/base/statistics.cc
@@ -28,8 +28,8 @@
* Authors: Nathan Binkert
*/
-#include <iomanip>
#include <fstream>
+#include <iomanip>
#include <list>
#include <map>
#include <string>
diff --git a/src/base/statistics.hh b/src/base/statistics.hh
index 579a7908e..bf2139caa 100644
--- a/src/base/statistics.hh
+++ b/src/base/statistics.hh
@@ -50,7 +50,7 @@
#include <algorithm>
#include <cassert>
#ifdef __SUNPRO_CC
-#include <math.h>
+#include <cmath>
#endif
#include <cmath>
#include <functional>
@@ -59,13 +59,13 @@
#include <string>
#include <vector>
+#include "base/stats/info.hh"
+#include "base/stats/types.hh"
+#include "base/stats/visit.hh"
#include "base/cast.hh"
#include "base/cprintf.hh"
#include "base/intmath.hh"
#include "base/refcnt.hh"
-#include "base/stats/info.hh"
-#include "base/stats/types.hh"
-#include "base/stats/visit.hh"
#include "base/str.hh"
#include "base/types.hh"
diff --git a/src/base/stats/info.hh b/src/base/stats/info.hh
index b1c05eed1..9c81442ee 100644
--- a/src/base/stats/info.hh
+++ b/src/base/stats/info.hh
@@ -31,8 +31,8 @@
#ifndef __BASE_STATS_INFO_HH__
#define __BASE_STATS_INFO_HH__
-#include "base/flags.hh"
#include "base/stats/types.hh"
+#include "base/flags.hh"
namespace Stats {
diff --git a/src/base/stats/mysql.cc b/src/base/stats/mysql.cc
index af13582b4..c08394605 100644
--- a/src/base/stats/mysql.cc
+++ b/src/base/stats/mysql.cc
@@ -35,13 +35,13 @@
#include <string>
#include <vector>
-#include "base/misc.hh"
-#include "base/mysql.hh"
-#include "base/statistics.hh"
#include "base/stats/info.hh"
#include "base/stats/mysql.hh"
#include "base/stats/mysql_run.hh"
#include "base/stats/types.hh"
+#include "base/misc.hh"
+#include "base/mysql.hh"
+#include "base/statistics.hh"
#include "base/str.hh"
#include "base/types.hh"
#include "base/userinfo.hh"
diff --git a/src/base/stats/output.cc b/src/base/stats/output.cc
index d3cb9da61..6e1ba1c3b 100644
--- a/src/base/stats/output.cc
+++ b/src/base/stats/output.cc
@@ -30,8 +30,8 @@
#include <list>
-#include "base/statistics.hh"
#include "base/stats/output.hh"
+#include "base/statistics.hh"
#include "base/types.hh"
#include "sim/eventq.hh"
diff --git a/src/base/stats/text.cc b/src/base/stats/text.cc
index 385b92a1a..05bad04bf 100644
--- a/src/base/stats/text.cc
+++ b/src/base/stats/text.cc
@@ -33,25 +33,25 @@
#endif
#if defined(__sun)
-#include <math.h>
+#include <cmath>
#endif
#include <cassert>
#ifdef __SUNPRO_CC
-#include <math.h>
+#include <cmath>
#endif
#include <cmath>
+#include <fstream>
#include <iostream>
#include <sstream>
-#include <fstream>
#include <string>
-#include "base/cast.hh"
-#include "base/misc.hh"
-#include "base/str.hh"
#include "base/stats/info.hh"
#include "base/stats/text.hh"
#include "base/stats/visit.hh"
+#include "base/cast.hh"
+#include "base/misc.hh"
+#include "base/str.hh"
using namespace std;
diff --git a/src/base/stats/text.hh b/src/base/stats/text.hh
index ab8512859..de2bf9401 100644
--- a/src/base/stats/text.hh
+++ b/src/base/stats/text.hh
@@ -34,8 +34,8 @@
#include <iosfwd>
#include <string>
-#include "base/output.hh"
#include "base/stats/output.hh"
+#include "base/output.hh"
namespace Stats {
diff --git a/src/base/str.hh b/src/base/str.hh
index 08953caf3..6d617df72 100644
--- a/src/base/str.hh
+++ b/src/base/str.hh
@@ -32,12 +32,11 @@
#ifndef __STR_HH__
#define __STR_HH__
+#include <cctype>
#include <sstream>
#include <string>
#include <vector>
-#include <ctype.h>
-
template<class> class Hash;
template<>
class Hash<std::string> {
diff --git a/src/base/time.hh b/src/base/time.hh
index 20b1c6d35..f2107d78f 100644
--- a/src/base/time.hh
+++ b/src/base/time.hh
@@ -33,7 +33,6 @@
#define __BASE_TIME_HH__
#include <sys/time.h>
-
#include <inttypes.h>
#include <cmath>
diff --git a/src/base/trace.cc b/src/base/trace.cc
index 22e05e664..7783b6d42 100644
--- a/src/base/trace.cc
+++ b/src/base/trace.cc
@@ -29,7 +29,7 @@
* Steve Reinhardt
*/
-#include <ctype.h>
+#include <cctype>
#include <fstream>
#include <iostream>
#include <list>
diff --git a/src/base/vnc/convert.cc b/src/base/vnc/convert.cc
index ea7a9b1c5..cd1502ce6 100644
--- a/src/base/vnc/convert.cc
+++ b/src/base/vnc/convert.cc
@@ -40,8 +40,8 @@
#include <cassert>
-#include "base/misc.hh"
#include "base/vnc/convert.hh"
+#include "base/misc.hh"
/** @file
* This file provides conversion functions for a variety of video modes
diff --git a/src/base/vnc/vncserver.cc b/src/base/vnc/vncserver.cc
index 8936fa67b..84e1a20e1 100644
--- a/src/base/vnc/vncserver.cc
+++ b/src/base/vnc/vncserver.cc
@@ -42,19 +42,19 @@
* Implementiation of a VNC server
*/
-#include <cstdio>
-
#include <sys/ioctl.h>
#include <sys/termios.h>
-#include <errno.h>
#include <poll.h>
#include <unistd.h>
+#include <cerrno>
+#include <cstdio>
+
+#include "base/vnc/vncserver.hh"
#include "base/atomicio.hh"
#include "base/misc.hh"
#include "base/socket.hh"
#include "base/trace.hh"
-#include "base/vnc/vncserver.hh"
#include "sim/byteswap.hh"
using namespace std;
diff --git a/src/base/vnc/vncserver.hh b/src/base/vnc/vncserver.hh
index 23b097b11..96dbdedda 100644
--- a/src/base/vnc/vncserver.hh
+++ b/src/base/vnc/vncserver.hh
@@ -47,13 +47,13 @@
#include <iostream>
+#include "base/vnc/convert.hh"
#include "base/circlebuf.hh"
#include "base/pollevent.hh"
#include "base/socket.hh"
-#include "base/vnc/convert.hh"
#include "cpu/intr_control.hh"
-#include "sim/sim_object.hh"
#include "params/VncServer.hh"
+#include "sim/sim_object.hh"
/**
* A device that expects to receive input from the vnc server should derrive
diff --git a/src/cpu/activity.cc b/src/cpu/activity.cc
index 9c9288c4d..84f88d594 100644
--- a/src/cpu/activity.cc
+++ b/src/cpu/activity.cc
@@ -30,8 +30,8 @@
#include <string>
-#include "cpu/timebuf.hh"
#include "cpu/activity.hh"
+#include "cpu/timebuf.hh"
using namespace std;
diff --git a/src/cpu/activity.hh b/src/cpu/activity.hh
index 8d3469c4e..f119c95cc 100644
--- a/src/cpu/activity.hh
+++ b/src/cpu/activity.hh
@@ -31,8 +31,8 @@
#ifndef __CPU_ACTIVITY_HH__
#define __CPU_ACTIVITY_HH__
-#include "cpu/timebuf.hh"
#include "base/trace.hh"
+#include "cpu/timebuf.hh"
/**
* ActivityRecorder helper class that informs the CPU if it can switch
diff --git a/src/cpu/base.cc b/src/cpu/base.cc
index 17ae65793..1d249b274 100644
--- a/src/cpu/base.cc
+++ b/src/cpu/base.cc
@@ -32,23 +32,23 @@
*/
#include <iostream>
-#include <string>
#include <sstream>
+#include <string>
#include "arch/tlb.hh"
-#include "base/cprintf.hh"
#include "base/loader/symtab.hh"
+#include "base/cprintf.hh"
#include "base/misc.hh"
#include "base/output.hh"
#include "base/trace.hh"
#include "cpu/base.hh"
#include "cpu/cpuevent.hh"
-#include "cpu/thread_context.hh"
#include "cpu/profile.hh"
+#include "cpu/thread_context.hh"
#include "params/BaseCPU.hh"
-#include "sim/sim_exit.hh"
#include "sim/process.hh"
#include "sim/sim_events.hh"
+#include "sim/sim_exit.hh"
#include "sim/system.hh"
// Hack
diff --git a/src/cpu/base.hh b/src/cpu/base.hh
index 8557b5bd5..ce02889f3 100644
--- a/src/cpu/base.hh
+++ b/src/cpu/base.hh
@@ -41,9 +41,9 @@
#include "base/statistics.hh"
#include "config/full_system.hh"
#include "config/the_isa.hh"
+#include "mem/mem_object.hh"
#include "sim/eventq.hh"
#include "sim/insttracer.hh"
-#include "mem/mem_object.hh"
#if FULL_SYSTEM
#include "arch/interrupts.hh"
diff --git a/src/cpu/base_dyn_inst_impl.hh b/src/cpu/base_dyn_inst_impl.hh
index 7e4d25322..688d5c66b 100644
--- a/src/cpu/base_dyn_inst_impl.hh
+++ b/src/cpu/base_dyn_inst_impl.hh
@@ -42,8 +42,8 @@
#include <iostream>
#include <set>
-#include <string>
#include <sstream>
+#include <string>
#include "base/cprintf.hh"
#include "base/trace.hh"
diff --git a/src/cpu/checker/cpu.cc b/src/cpu/checker/cpu.cc
index 079057765..0c7fe66bf 100644
--- a/src/cpu/checker/cpu.cc
+++ b/src/cpu/checker/cpu.cc
@@ -31,8 +31,8 @@
#include <list>
#include <string>
-#include "cpu/base.hh"
#include "cpu/checker/cpu.hh"
+#include "cpu/base.hh"
#include "cpu/simple_thread.hh"
#include "cpu/static_inst.hh"
#include "cpu/thread_context.hh"
diff --git a/src/cpu/checker/cpu.hh b/src/cpu/checker/cpu.hh
index efd8a4776..1e3a17a34 100644
--- a/src/cpu/checker/cpu.hh
+++ b/src/cpu/checker/cpu.hh
@@ -32,16 +32,16 @@
#define __CPU_CHECKER_CPU_HH__
#include <list>
-#include <queue>
#include <map>
+#include <queue>
#include "arch/types.hh"
#include "base/statistics.hh"
#include "config/full_system.hh"
#include "cpu/base.hh"
#include "cpu/base_dyn_inst.hh"
-#include "cpu/simple_thread.hh"
#include "cpu/pc_event.hh"
+#include "cpu/simple_thread.hh"
#include "cpu/static_inst.hh"
#include "sim/eventq.hh"
diff --git a/src/cpu/checker/cpu_impl.hh b/src/cpu/checker/cpu_impl.hh
index 8197d560d..8694dae21 100644
--- a/src/cpu/checker/cpu_impl.hh
+++ b/src/cpu/checker/cpu_impl.hh
@@ -33,11 +33,11 @@
#include "base/refcnt.hh"
#include "config/the_isa.hh"
-#include "cpu/base_dyn_inst.hh"
#include "cpu/checker/cpu.hh"
+#include "cpu/base_dyn_inst.hh"
#include "cpu/simple_thread.hh"
-#include "cpu/thread_context.hh"
#include "cpu/static_inst.hh"
+#include "cpu/thread_context.hh"
#include "sim/sim_object.hh"
#include "sim/stats.hh"
diff --git a/src/cpu/cpuevent.hh b/src/cpu/cpuevent.hh
index 65f0e87e1..77b1d9138 100644
--- a/src/cpu/cpuevent.hh
+++ b/src/cpu/cpuevent.hh
@@ -32,6 +32,7 @@
#define __CPU_CPUEVENT_HH__
#include <vector>
+
#include "sim/eventq.hh"
class ThreadContext;
diff --git a/src/cpu/exetrace.cc b/src/cpu/exetrace.cc
index 760e5bd51..ea90ba7c2 100644
--- a/src/cpu/exetrace.cc
+++ b/src/cpu/exetrace.cc
@@ -36,11 +36,11 @@
#include "arch/isa_traits.hh"
#include "arch/utility.hh"
#include "base/loader/symtab.hh"
+#include "config/the_isa.hh"
#include "cpu/base.hh"
#include "cpu/exetrace.hh"
#include "cpu/static_inst.hh"
#include "cpu/thread_context.hh"
-#include "config/the_isa.hh"
#include "enums/OpClass.hh"
using namespace std;
diff --git a/src/cpu/func_unit.hh b/src/cpu/func_unit.hh
index e8238ba73..59c5ee8a0 100644
--- a/src/cpu/func_unit.hh
+++ b/src/cpu/func_unit.hh
@@ -36,8 +36,8 @@
#include <vector>
#include "cpu/op_class.hh"
-#include "params/OpDesc.hh"
#include "params/FUDesc.hh"
+#include "params/OpDesc.hh"
#include "sim/sim_object.hh"
////////////////////////////////////////////////////////////////////////////
diff --git a/src/cpu/inorder/cpu.cc b/src/cpu/inorder/cpu.cc
index 1c2fc6333..f7fff05d3 100644
--- a/src/cpu/inorder/cpu.cc
+++ b/src/cpu/inorder/cpu.cc
@@ -34,17 +34,17 @@
#include "arch/utility.hh"
#include "config/full_system.hh"
#include "config/the_isa.hh"
-#include "cpu/activity.hh"
-#include "cpu/base.hh"
-#include "cpu/exetrace.hh"
+#include "cpu/inorder/resources/resource_list.hh"
#include "cpu/inorder/cpu.hh"
#include "cpu/inorder/first_stage.hh"
#include "cpu/inorder/inorder_dyn_inst.hh"
#include "cpu/inorder/pipeline_traits.hh"
#include "cpu/inorder/resource_pool.hh"
-#include "cpu/inorder/resources/resource_list.hh"
#include "cpu/inorder/thread_context.hh"
#include "cpu/inorder/thread_state.hh"
+#include "cpu/activity.hh"
+#include "cpu/base.hh"
+#include "cpu/exetrace.hh"
#include "cpu/simple_thread.hh"
#include "cpu/thread_context.hh"
#include "mem/translating_port.hh"
diff --git a/src/cpu/inorder/cpu.hh b/src/cpu/inorder/cpu.hh
index 403c931b2..af2fa5ced 100644
--- a/src/cpu/inorder/cpu.hh
+++ b/src/cpu/inorder/cpu.hh
@@ -39,23 +39,23 @@
#include <vector>
#include "arch/isa_traits.hh"
-#include "arch/types.hh"
#include "arch/registers.hh"
+#include "arch/types.hh"
#include "base/statistics.hh"
-#include "cpu/timebuf.hh"
#include "base/types.hh"
#include "config/full_system.hh"
#include "config/the_isa.hh"
-#include "cpu/activity.hh"
-#include "cpu/base.hh"
-#include "cpu/simple_thread.hh"
#include "cpu/inorder/inorder_dyn_inst.hh"
-#include "cpu/inorder/pipeline_traits.hh"
#include "cpu/inorder/pipeline_stage.hh"
-#include "cpu/inorder/thread_state.hh"
+#include "cpu/inorder/pipeline_traits.hh"
#include "cpu/inorder/reg_dep_map.hh"
+#include "cpu/inorder/thread_state.hh"
#include "cpu/o3/dep_graph.hh"
#include "cpu/o3/rename_map.hh"
+#include "cpu/activity.hh"
+#include "cpu/base.hh"
+#include "cpu/simple_thread.hh"
+#include "cpu/timebuf.hh"
#include "mem/packet.hh"
#include "mem/port.hh"
#include "mem/request.hh"
diff --git a/src/cpu/inorder/first_stage.cc b/src/cpu/inorder/first_stage.cc
index b656ca1c7..bf57681a7 100644
--- a/src/cpu/inorder/first_stage.cc
+++ b/src/cpu/inorder/first_stage.cc
@@ -30,10 +30,10 @@
*/
#include "base/str.hh"
-#include "cpu/inorder/first_stage.hh"
#include "cpu/inorder/resources/resource_list.hh"
-#include "cpu/inorder/resource_pool.hh"
#include "cpu/inorder/cpu.hh"
+#include "cpu/inorder/first_stage.hh"
+#include "cpu/inorder/resource_pool.hh"
#include "params/InOrderTrace.hh"
using namespace std;
diff --git a/src/cpu/inorder/first_stage.hh b/src/cpu/inorder/first_stage.hh
index 26151075c..5e8aecfea 100644
--- a/src/cpu/inorder/first_stage.hh
+++ b/src/cpu/inorder/first_stage.hh
@@ -36,12 +36,12 @@
#include <vector>
#include "base/statistics.hh"
-#include "cpu/timebuf.hh"
-#include "cpu/inorder/inorder_dyn_inst.hh"
#include "cpu/inorder/comm.hh"
+#include "cpu/inorder/inorder_dyn_inst.hh"
#include "cpu/inorder/params.hh"
-#include "cpu/inorder/pipeline_traits.hh"
#include "cpu/inorder/pipeline_stage.hh"
+#include "cpu/inorder/pipeline_traits.hh"
+#include "cpu/timebuf.hh"
class InOrderCPU;
diff --git a/src/cpu/inorder/inorder_cpu_builder.cc b/src/cpu/inorder/inorder_cpu_builder.cc
index a19137dd8..99729577e 100644
--- a/src/cpu/inorder/inorder_cpu_builder.cc
+++ b/src/cpu/inorder/inorder_cpu_builder.cc
@@ -31,12 +31,12 @@
#include <string>
-#include "cpu/base.hh"
-#include "cpu/inst_seq.hh"
-#include "cpu/static_inst.hh"
#include "cpu/inorder/cpu.hh"
#include "cpu/inorder/inorder_dyn_inst.hh"
#include "cpu/inorder/pipeline_traits.hh"
+#include "cpu/base.hh"
+#include "cpu/inst_seq.hh"
+#include "cpu/static_inst.hh"
#include "params/InOrderCPU.hh"
InOrderCPU *
diff --git a/src/cpu/inorder/inorder_dyn_inst.cc b/src/cpu/inorder/inorder_dyn_inst.cc
index ebd7b7cbb..90134f533 100644
--- a/src/cpu/inorder/inorder_dyn_inst.cc
+++ b/src/cpu/inorder/inorder_dyn_inst.cc
@@ -31,16 +31,16 @@
#include <iostream>
#include <set>
-#include <string>
#include <sstream>
+#include <string>
#include "arch/faults.hh"
#include "base/cprintf.hh"
#include "base/trace.hh"
#include "config/the_isa.hh"
-#include "cpu/exetrace.hh"
#include "cpu/inorder/cpu.hh"
#include "cpu/inorder/inorder_dyn_inst.hh"
+#include "cpu/exetrace.hh"
#include "mem/request.hh"
using namespace std;
diff --git a/src/cpu/inorder/inorder_dyn_inst.hh b/src/cpu/inorder/inorder_dyn_inst.hh
index 830244ae8..1fbc476e8 100644
--- a/src/cpu/inorder/inorder_dyn_inst.hh
+++ b/src/cpu/inorder/inorder_dyn_inst.hh
@@ -47,12 +47,12 @@
#include "base/types.hh"
#include "config/full_system.hh"
#include "config/the_isa.hh"
-#include "cpu/exetrace.hh"
#include "cpu/inorder/inorder_trace.hh"
#include "cpu/inorder/pipeline_traits.hh"
#include "cpu/inorder/resource.hh"
#include "cpu/inorder/resource_sked.hh"
#include "cpu/inorder/thread_state.hh"
+#include "cpu/exetrace.hh"
#include "cpu/inst_seq.hh"
#include "cpu/op_class.hh"
#include "cpu/static_inst.hh"
diff --git a/src/cpu/inorder/inorder_trace.cc b/src/cpu/inorder/inorder_trace.cc
index 75f6be63d..8d40451bd 100644
--- a/src/cpu/inorder/inorder_trace.cc
+++ b/src/cpu/inorder/inorder_trace.cc
@@ -32,10 +32,10 @@
#include <iomanip>
#include "config/the_isa.hh"
-#include "cpu/exetrace.hh"
#include "cpu/inorder/inorder_trace.hh"
-#include "cpu/static_inst.hh"
#include "cpu/inorder/pipeline_traits.hh"
+#include "cpu/exetrace.hh"
+#include "cpu/static_inst.hh"
#include "cpu/thread_context.hh"
#include "params/InOrderTrace.hh"
diff --git a/src/cpu/inorder/pipeline_stage.cc b/src/cpu/inorder/pipeline_stage.cc
index b267ac00e..b9e21e20f 100644
--- a/src/cpu/inorder/pipeline_stage.cc
+++ b/src/cpu/inorder/pipeline_stage.cc
@@ -31,9 +31,9 @@
#include "base/str.hh"
#include "config/the_isa.hh"
+#include "cpu/inorder/cpu.hh"
#include "cpu/inorder/pipeline_stage.hh"
#include "cpu/inorder/resource_pool.hh"
-#include "cpu/inorder/cpu.hh"
using namespace std;
using namespace ThePipeline;
diff --git a/src/cpu/inorder/pipeline_stage.hh b/src/cpu/inorder/pipeline_stage.hh
index ec70fefc5..d0d9112c0 100644
--- a/src/cpu/inorder/pipeline_stage.hh
+++ b/src/cpu/inorder/pipeline_stage.hh
@@ -36,11 +36,11 @@
#include <vector>
#include "base/statistics.hh"
-#include "cpu/timebuf.hh"
-#include "cpu/inorder/inorder_dyn_inst.hh"
#include "cpu/inorder/comm.hh"
-#include "params/InOrderCPU.hh"
+#include "cpu/inorder/inorder_dyn_inst.hh"
#include "cpu/inorder/pipeline_traits.hh"
+#include "cpu/timebuf.hh"
+#include "params/InOrderCPU.hh"
class InOrderCPU;
diff --git a/src/cpu/inorder/pipeline_traits.5stage.cc b/src/cpu/inorder/pipeline_traits.5stage.cc
index 50c30af1e..f15a3cb11 100644
--- a/src/cpu/inorder/pipeline_traits.5stage.cc
+++ b/src/cpu/inorder/pipeline_traits.5stage.cc
@@ -29,9 +29,9 @@
*
*/
-#include "cpu/inorder/pipeline_traits.hh"
-#include "cpu/inorder/inorder_dyn_inst.hh"
#include "cpu/inorder/resources/resource_list.hh"
+#include "cpu/inorder/inorder_dyn_inst.hh"
+#include "cpu/inorder/pipeline_traits.hh"
using namespace std;
diff --git a/src/cpu/inorder/pipeline_traits.5stage.hh b/src/cpu/inorder/pipeline_traits.5stage.hh
index aea6eff37..5e5ef6efd 100644
--- a/src/cpu/inorder/pipeline_traits.5stage.hh
+++ b/src/cpu/inorder/pipeline_traits.5stage.hh
@@ -39,7 +39,6 @@
#include "arch/isa_traits.hh"
#include "cpu/inorder/params.hh"
-
class InOrderDynInst;
/* This Namespace contains constants, typedefs, functions and
diff --git a/src/cpu/inorder/pipeline_traits.9stage.cc b/src/cpu/inorder/pipeline_traits.9stage.cc
index d686bb3bc..e8ff3acd4 100644
--- a/src/cpu/inorder/pipeline_traits.9stage.cc
+++ b/src/cpu/inorder/pipeline_traits.9stage.cc
@@ -29,9 +29,9 @@
*
*/
-#include "cpu/inorder/pipeline_traits.hh"
-#include "cpu/inorder/inorder_dyn_inst.hh"
#include "cpu/inorder/resources/resource_list.hh"
+#include "cpu/inorder/inorder_dyn_inst.hh"
+#include "cpu/inorder/pipeline_traits.hh"
using namespace std;
diff --git a/src/cpu/inorder/pipeline_traits.9stage.hh b/src/cpu/inorder/pipeline_traits.9stage.hh
index 91e537366..d4125baea 100644
--- a/src/cpu/inorder/pipeline_traits.9stage.hh
+++ b/src/cpu/inorder/pipeline_traits.9stage.hh
@@ -33,14 +33,13 @@
#define __CPU_INORDER_PIPELINE_IMPL_HH__
#include <list>
+#include <map>
#include <queue>
#include <vector>
-#include <map>
#include "arch/isa_traits.hh"
#include "cpu/inorder/params.hh"
-
class InOrderDynInst;
/* This Namespace contains constants, typedefs, functions and
diff --git a/src/cpu/inorder/pipeline_traits.9stage.smt2.cc b/src/cpu/inorder/pipeline_traits.9stage.smt2.cc
index 9d2ed8e61..68c1d0eab 100644
--- a/src/cpu/inorder/pipeline_traits.9stage.smt2.cc
+++ b/src/cpu/inorder/pipeline_traits.9stage.smt2.cc
@@ -29,9 +29,9 @@
*
*/
-#include "cpu/inorder/pipeline_traits.hh"
-#include "cpu/inorder/inorder_dyn_inst.hh"
#include "cpu/inorder/resources/resource_list.hh"
+#include "cpu/inorder/inorder_dyn_inst.hh"
+#include "cpu/inorder/pipeline_traits.hh"
using namespace std;
diff --git a/src/cpu/inorder/pipeline_traits.9stage.smt2.hh b/src/cpu/inorder/pipeline_traits.9stage.smt2.hh
index 22da4ea0f..f620289c3 100644
--- a/src/cpu/inorder/pipeline_traits.9stage.smt2.hh
+++ b/src/cpu/inorder/pipeline_traits.9stage.smt2.hh
@@ -33,14 +33,13 @@
#define __CPU_INORDER_PIPELINE_IMPL_HH__
#include <list>
+#include <map>
#include <queue>
#include <vector>
-#include <map>
#include "arch/isa_traits.hh"
#include "cpu/inorder/params.hh"
-
class InOrderDynInst;
/* This Namespace contains constants, typedefs, functions and
diff --git a/src/cpu/inorder/pipeline_traits.hh b/src/cpu/inorder/pipeline_traits.hh
index 573c0200a..dd12a8f1d 100644
--- a/src/cpu/inorder/pipeline_traits.hh
+++ b/src/cpu/inorder/pipeline_traits.hh
@@ -38,7 +38,6 @@
#include "arch/isa_traits.hh"
#include "cpu/base.hh"
-
#include "params/InOrderCPU.hh"
class InOrderDynInst;
diff --git a/src/cpu/inorder/reg_dep_map.cc b/src/cpu/inorder/reg_dep_map.cc
index 48820b50e..8eb7a3111 100644
--- a/src/cpu/inorder/reg_dep_map.cc
+++ b/src/cpu/inorder/reg_dep_map.cc
@@ -31,10 +31,10 @@
#include "arch/isa_traits.hh"
#include "config/the_isa.hh"
+#include "cpu/inorder/cpu.hh"
+#include "cpu/inorder/inorder_dyn_inst.hh"
#include "cpu/inorder/pipeline_traits.hh"
#include "cpu/inorder/reg_dep_map.hh"
-#include "cpu/inorder/inorder_dyn_inst.hh"
-#include "cpu/inorder/cpu.hh"
using namespace std;
using namespace TheISA;
diff --git a/src/cpu/inorder/resource.cc b/src/cpu/inorder/resource.cc
index 24211532e..b72dbd14f 100644
--- a/src/cpu/inorder/resource.cc
+++ b/src/cpu/inorder/resource.cc
@@ -29,12 +29,12 @@
*
*/
-#include <vector>
#include <list>
+#include <vector>
#include "base/str.hh"
-#include "cpu/inorder/resource.hh"
#include "cpu/inorder/cpu.hh"
+#include "cpu/inorder/resource.hh"
using namespace std;
Resource::Resource(string res_name, int res_id, int res_width,
diff --git a/src/cpu/inorder/resource.hh b/src/cpu/inorder/resource.hh
index 7899a215f..0f2cde7d1 100644
--- a/src/cpu/inorder/resource.hh
+++ b/src/cpu/inorder/resource.hh
@@ -32,14 +32,14 @@
#ifndef __CPU_INORDER_RESOURCE_HH__
#define __CPU_INORDER_RESOURCE_HH__
-#include <vector>
#include <list>
#include <string>
+#include <vector>
#include "base/types.hh"
-#include "cpu/inst_seq.hh"
#include "cpu/inorder/inorder_dyn_inst.hh"
#include "cpu/inorder/pipeline_traits.hh"
+#include "cpu/inst_seq.hh"
#include "sim/eventq.hh"
#include "sim/sim_object.hh"
diff --git a/src/cpu/inorder/resource_pool.9stage.cc b/src/cpu/inorder/resource_pool.9stage.cc
index 746d3f33b..93b0ac4e4 100644
--- a/src/cpu/inorder/resource_pool.9stage.cc
+++ b/src/cpu/inorder/resource_pool.9stage.cc
@@ -29,11 +29,11 @@
*
*/
-#include "cpu/inorder/resource_pool.hh"
-#include "cpu/inorder/resources/resource_list.hh"
-
-#include <vector>
#include <list>
+#include <vector>
+
+#include "cpu/inorder/resources/resource_list.hh"
+#include "cpu/inorder/resource_pool.hh"
using namespace std;
using namespace ThePipeline;
diff --git a/src/cpu/inorder/resource_pool.cc b/src/cpu/inorder/resource_pool.cc
index 4e2f930ab..a9eb742f4 100644
--- a/src/cpu/inorder/resource_pool.cc
+++ b/src/cpu/inorder/resource_pool.cc
@@ -29,11 +29,11 @@
*
*/
-#include "cpu/inorder/resource_pool.hh"
-#include "cpu/inorder/resources/resource_list.hh"
-
-#include <vector>
#include <list>
+#include <vector>
+
+#include "cpu/inorder/resources/resource_list.hh"
+#include "cpu/inorder/resource_pool.hh"
using namespace std;
using namespace ThePipeline;
diff --git a/src/cpu/inorder/resource_pool.hh b/src/cpu/inorder/resource_pool.hh
index fde38b4e9..9d9439665 100644
--- a/src/cpu/inorder/resource_pool.hh
+++ b/src/cpu/inorder/resource_pool.hh
@@ -32,17 +32,17 @@
#ifndef __CPU_INORDER_RESOURCE_POOL_HH__
#define __CPU_INORDER_RESOURCE_POOL_HH__
-#include <vector>
#include <list>
#include <string>
+#include <vector>
-#include "cpu/inst_seq.hh"
+#include "cpu/inorder/cpu.hh"
#include "cpu/inorder/inorder_dyn_inst.hh"
-#include "cpu/inorder/resource.hh"
-#include "cpu/inorder/pipeline_traits.hh"
#include "cpu/inorder/params.hh"
+#include "cpu/inorder/pipeline_traits.hh"
+#include "cpu/inorder/resource.hh"
+#include "cpu/inst_seq.hh"
#include "params/InOrderCPU.hh"
-#include "cpu/inorder/cpu.hh"
#include "sim/eventq.hh"
#include "sim/sim_object.hh"
diff --git a/src/cpu/inorder/resource_sked.cc b/src/cpu/inorder/resource_sked.cc
index 4cf791228..443500870 100644
--- a/src/cpu/inorder/resource_sked.cc
+++ b/src/cpu/inorder/resource_sked.cc
@@ -29,12 +29,12 @@
*
*/
-#include "cpu/inorder/resource_sked.hh"
-#include "cpu/inorder/pipeline_traits.hh"
-
-#include <vector>
-#include <list>
#include <cstdio>
+#include <list>
+#include <vector>
+
+#include "cpu/inorder/pipeline_traits.hh"
+#include "cpu/inorder/resource_sked.hh"
using namespace std;
using namespace ThePipeline;
diff --git a/src/cpu/inorder/resource_sked.hh b/src/cpu/inorder/resource_sked.hh
index bd002e161..6338e8e9b 100644
--- a/src/cpu/inorder/resource_sked.hh
+++ b/src/cpu/inorder/resource_sked.hh
@@ -32,9 +32,9 @@
#ifndef __CPU_INORDER_RESOURCE_SKED_HH__
#define __CPU_INORDER_RESOURCE_SKED_HH__
-#include <vector>
-#include <list>
#include <cstdlib>
+#include <list>
+#include <vector>
/** ScheduleEntry class represents a single function that an instruction
wants to do at any pipeline stage. For example, if an instruction
diff --git a/src/cpu/inorder/resources/agen_unit.hh b/src/cpu/inorder/resources/agen_unit.hh
index 7c9c5fd89..f208ec680 100644
--- a/src/cpu/inorder/resources/agen_unit.hh
+++ b/src/cpu/inorder/resources/agen_unit.hh
@@ -32,15 +32,15 @@
#ifndef __CPU_INORDER_AGEN_UNIT_HH__
#define __CPU_INORDER_AGEN_UNIT_HH__
-#include <vector>
#include <list>
#include <string>
+#include <vector>
-#include "cpu/inorder/resource.hh"
-#include "cpu/inorder/inorder_dyn_inst.hh"
-#include "cpu/inorder/pipeline_traits.hh"
#include "cpu/inorder/cpu.hh"
+#include "cpu/inorder/inorder_dyn_inst.hh"
#include "cpu/inorder/params.hh"
+#include "cpu/inorder/pipeline_traits.hh"
+#include "cpu/inorder/resource.hh"
class AGENUnit : public Resource {
public:
diff --git a/src/cpu/inorder/resources/bpred_unit.hh b/src/cpu/inorder/resources/bpred_unit.hh
index 3b1c0f4ef..33ca4a0c6 100644
--- a/src/cpu/inorder/resources/bpred_unit.hh
+++ b/src/cpu/inorder/resources/bpred_unit.hh
@@ -36,7 +36,6 @@
#include "arch/isa_traits.hh"
#include "base/statistics.hh"
-#include "cpu/inst_seq.hh"
#include "cpu/inorder/inorder_dyn_inst.hh"
#include "cpu/inorder/pipeline_traits.hh"
#include "cpu/inorder/resource.hh"
@@ -44,6 +43,7 @@
#include "cpu/pred/btb.hh"
#include "cpu/pred/ras.hh"
#include "cpu/pred/tournament.hh"
+#include "cpu/inst_seq.hh"
#include "params/InOrderCPU.hh"
/**
diff --git a/src/cpu/inorder/resources/branch_predictor.hh b/src/cpu/inorder/resources/branch_predictor.hh
index 00915fd0d..72b216806 100644
--- a/src/cpu/inorder/resources/branch_predictor.hh
+++ b/src/cpu/inorder/resources/branch_predictor.hh
@@ -32,15 +32,15 @@
#ifndef __CPU_INORDER_BRANCH_PREDICTOR_HH__
#define __CPU_INORDER_BRANCH_PREDICTOR_HH__
-#include <vector>
#include <list>
#include <string>
+#include <vector>
-#include "cpu/inorder/resource.hh"
-#include "cpu/inorder/inorder_dyn_inst.hh"
-#include "cpu/inorder/pipeline_traits.hh"
#include "cpu/inorder/resources/bpred_unit.hh"
#include "cpu/inorder/cpu.hh"
+#include "cpu/inorder/inorder_dyn_inst.hh"
+#include "cpu/inorder/pipeline_traits.hh"
+#include "cpu/inorder/resource.hh"
class BranchPredictor : public Resource {
public:
diff --git a/src/cpu/inorder/resources/cache_unit.cc b/src/cpu/inorder/resources/cache_unit.cc
index e98b27d62..ce4c538da 100644
--- a/src/cpu/inorder/resources/cache_unit.cc
+++ b/src/cpu/inorder/resources/cache_unit.cc
@@ -29,17 +29,17 @@
*
*/
-#include <vector>
#include <list>
+#include <vector>
#include "arch/isa_traits.hh"
#include "arch/locked_mem.hh"
-#include "arch/utility.hh"
#include "arch/predecoder.hh"
+#include "arch/utility.hh"
#include "config/the_isa.hh"
#include "cpu/inorder/resources/cache_unit.hh"
-#include "cpu/inorder/pipeline_traits.hh"
#include "cpu/inorder/cpu.hh"
+#include "cpu/inorder/pipeline_traits.hh"
#include "cpu/inorder/resource_pool.hh"
#include "mem/request.hh"
diff --git a/src/cpu/inorder/resources/cache_unit.hh b/src/cpu/inorder/resources/cache_unit.hh
index 1aab099e9..c4a5dc0bd 100644
--- a/src/cpu/inorder/resources/cache_unit.hh
+++ b/src/cpu/inorder/resources/cache_unit.hh
@@ -32,9 +32,9 @@
#ifndef __CPU_INORDER_CACHE_UNIT_HH__
#define __CPU_INORDER_CACHE_UNIT_HH__
-#include <vector>
#include <list>
#include <string>
+#include <vector>
#include "arch/predecoder.hh"
#include "arch/tlb.hh"
diff --git a/src/cpu/inorder/resources/decode_unit.hh b/src/cpu/inorder/resources/decode_unit.hh
index 1c4dc0523..3742af3e2 100644
--- a/src/cpu/inorder/resources/decode_unit.hh
+++ b/src/cpu/inorder/resources/decode_unit.hh
@@ -32,15 +32,15 @@
#ifndef __CPU_INORDER_DECODE_UNIT_HH__
#define __CPU_INORDER_DECODE_UNIT_HH__
-#include <vector>
#include <list>
#include <string>
+#include <vector>
-#include "cpu/inorder/resource.hh"
+#include "cpu/inorder/cpu.hh"
#include "cpu/inorder/inorder_dyn_inst.hh"
#include "cpu/inorder/pipeline_traits.hh"
-#include "cpu/inorder/cpu.hh"
#include "cpu/inorder/reg_dep_map.hh"
+#include "cpu/inorder/resource.hh"
class DecodeUnit : public Resource {
public:
diff --git a/src/cpu/inorder/resources/execution_unit.cc b/src/cpu/inorder/resources/execution_unit.cc
index 311add9f8..2ec340749 100644
--- a/src/cpu/inorder/resources/execution_unit.cc
+++ b/src/cpu/inorder/resources/execution_unit.cc
@@ -29,11 +29,12 @@
*
*/
-#include <vector>
#include <list>
+#include <vector>
+
#include "cpu/inorder/resources/execution_unit.hh"
-#include "cpu/inorder/resource_pool.hh"
#include "cpu/inorder/cpu.hh"
+#include "cpu/inorder/resource_pool.hh"
using namespace std;
using namespace ThePipeline;
diff --git a/src/cpu/inorder/resources/execution_unit.hh b/src/cpu/inorder/resources/execution_unit.hh
index b03a6655e..ed645ec3b 100644
--- a/src/cpu/inorder/resources/execution_unit.hh
+++ b/src/cpu/inorder/resources/execution_unit.hh
@@ -32,14 +32,14 @@
#ifndef __CPU_INORDER_EXECUTION_UNIT_HH__
#define __CPU_INORDER_EXECUTION_UNIT_HH__
-#include <vector>
#include <list>
#include <string>
+#include <vector>
-#include "cpu/func_unit.hh"
#include "cpu/inorder/first_stage.hh"
-#include "cpu/inorder/resource.hh"
#include "cpu/inorder/inorder_dyn_inst.hh"
+#include "cpu/inorder/resource.hh"
+#include "cpu/func_unit.hh"
class ExecutionUnit : public Resource {
public:
diff --git a/src/cpu/inorder/resources/fetch_seq_unit.hh b/src/cpu/inorder/resources/fetch_seq_unit.hh
index a258dc0e5..be3c59a13 100644
--- a/src/cpu/inorder/resources/fetch_seq_unit.hh
+++ b/src/cpu/inorder/resources/fetch_seq_unit.hh
@@ -32,15 +32,15 @@
#ifndef __CPU_INORDER_FETCH_SEQ_UNIT_HH__
#define __CPU_INORDER_FETCH_SEQ_UNIT_HH__
-#include <vector>
#include <list>
#include <string>
+#include <vector>
#include "config/the_isa.hh"
-#include "cpu/inorder/resource.hh"
+#include "cpu/inorder/cpu.hh"
#include "cpu/inorder/inorder_dyn_inst.hh"
#include "cpu/inorder/pipeline_traits.hh"
-#include "cpu/inorder/cpu.hh"
+#include "cpu/inorder/resource.hh"
class FetchSeqUnit : public Resource {
public:
diff --git a/src/cpu/inorder/resources/fetch_unit.cc b/src/cpu/inorder/resources/fetch_unit.cc
index d6038415e..899fa8c08 100644
--- a/src/cpu/inorder/resources/fetch_unit.cc
+++ b/src/cpu/inorder/resources/fetch_unit.cc
@@ -29,18 +29,18 @@
*
*/
-#include <vector>
#include <list>
+#include <vector>
#include "arch/isa_traits.hh"
#include "arch/locked_mem.hh"
-#include "arch/utility.hh"
#include "arch/predecoder.hh"
+#include "arch/utility.hh"
#include "config/the_isa.hh"
#include "cpu/inorder/resources/cache_unit.hh"
#include "cpu/inorder/resources/fetch_unit.hh"
-#include "cpu/inorder/pipeline_traits.hh"
#include "cpu/inorder/cpu.hh"
+#include "cpu/inorder/pipeline_traits.hh"
#include "cpu/inorder/resource_pool.hh"
#include "mem/request.hh"
diff --git a/src/cpu/inorder/resources/fetch_unit.hh b/src/cpu/inorder/resources/fetch_unit.hh
index fa133b9eb..3075e726d 100644
--- a/src/cpu/inorder/resources/fetch_unit.hh
+++ b/src/cpu/inorder/resources/fetch_unit.hh
@@ -32,17 +32,17 @@
#ifndef __CPU_INORDER_FETCH_UNIT_HH__
#define __CPU_INORDER_FETCH_UNIT_HH__
-#include <vector>
#include <list>
#include <string>
+#include <vector>
#include "arch/predecoder.hh"
#include "arch/tlb.hh"
#include "config/the_isa.hh"
+#include "cpu/inorder/resources/cache_unit.hh"
#include "cpu/inorder/inorder_dyn_inst.hh"
#include "cpu/inorder/pipeline_traits.hh"
#include "cpu/inorder/resource.hh"
-#include "cpu/inorder/resources/cache_unit.hh"
#include "mem/packet.hh"
#include "mem/packet_access.hh"
#include "mem/port.hh"
diff --git a/src/cpu/inorder/resources/graduation_unit.hh b/src/cpu/inorder/resources/graduation_unit.hh
index 59631bfcb..043e375e7 100644
--- a/src/cpu/inorder/resources/graduation_unit.hh
+++ b/src/cpu/inorder/resources/graduation_unit.hh
@@ -32,14 +32,14 @@
#ifndef __CPU_INORDER_GRAD_UNIT_HH__
#define __CPU_INORDER_GRAD_UNIT_HH__
-#include <vector>
#include <list>
#include <string>
+#include <vector>
-#include "cpu/inorder/resource.hh"
+#include "cpu/inorder/cpu.hh"
#include "cpu/inorder/inorder_dyn_inst.hh"
#include "cpu/inorder/pipeline_traits.hh"
-#include "cpu/inorder/cpu.hh"
+#include "cpu/inorder/resource.hh"
class GraduationUnit : public Resource {
public:
diff --git a/src/cpu/inorder/resources/inst_buffer.cc b/src/cpu/inorder/resources/inst_buffer.cc
index 46f5cce72..e0405879b 100644
--- a/src/cpu/inorder/resources/inst_buffer.cc
+++ b/src/cpu/inorder/resources/inst_buffer.cc
@@ -29,14 +29,14 @@
*
*/
-#include <vector>
#include <list>
+#include <vector>
#include "arch/isa_traits.hh"
#include "config/the_isa.hh"
-#include "cpu/inorder/pipeline_traits.hh"
#include "cpu/inorder/resources/inst_buffer.hh"
#include "cpu/inorder/cpu.hh"
+#include "cpu/inorder/pipeline_traits.hh"
using namespace std;
using namespace TheISA;
diff --git a/src/cpu/inorder/resources/inst_buffer.hh b/src/cpu/inorder/resources/inst_buffer.hh
index fcbdc20df..d0047e013 100644
--- a/src/cpu/inorder/resources/inst_buffer.hh
+++ b/src/cpu/inorder/resources/inst_buffer.hh
@@ -32,14 +32,14 @@
#ifndef __CPU_INORDER_INST_BUFF_UNIT_HH__
#define __CPU_INORDER_INST_BUFF_UNIT_HH__
-#include <vector>
#include <list>
#include <string>
+#include <vector>
-#include "cpu/inorder/resource.hh"
+#include "cpu/inorder/cpu.hh"
#include "cpu/inorder/inorder_dyn_inst.hh"
#include "cpu/inorder/pipeline_traits.hh"
-#include "cpu/inorder/cpu.hh"
+#include "cpu/inorder/resource.hh"
class InstBuffer : public Resource {
public:
diff --git a/src/cpu/inorder/resources/mem_dep_unit.hh b/src/cpu/inorder/resources/mem_dep_unit.hh
index 018593eaf..387bee0b9 100644
--- a/src/cpu/inorder/resources/mem_dep_unit.hh
+++ b/src/cpu/inorder/resources/mem_dep_unit.hh
@@ -32,14 +32,14 @@
#ifndef __CPU_INORDER_MEM_DEP_UNIT_HH__
#define __CPU_INORDER_MEM_DEP_UNIT_HH__
-#include <vector>
#include <list>
#include <string>
+#include <vector>
-#include "cpu/inorder/resource.hh"
+#include "cpu/inorder/cpu.hh"
#include "cpu/inorder/inorder_dyn_inst.hh"
#include "cpu/inorder/pipeline_traits.hh"
-#include "cpu/inorder/cpu.hh"
+#include "cpu/inorder/resource.hh"
class MemDepUnit : public Resource {
public:
diff --git a/src/cpu/inorder/resources/mult_div_unit.cc b/src/cpu/inorder/resources/mult_div_unit.cc
index ad8b2b47b..8fbfc231e 100644
--- a/src/cpu/inorder/resources/mult_div_unit.cc
+++ b/src/cpu/inorder/resources/mult_div_unit.cc
@@ -29,11 +29,12 @@
*
*/
-#include <vector>
#include <list>
+#include <vector>
+
#include "cpu/inorder/resources/mult_div_unit.hh"
-#include "cpu/inorder/resource_pool.hh"
#include "cpu/inorder/cpu.hh"
+#include "cpu/inorder/resource_pool.hh"
#include "cpu/op_class.hh"
using namespace std;
diff --git a/src/cpu/inorder/resources/mult_div_unit.hh b/src/cpu/inorder/resources/mult_div_unit.hh
index d243eebea..753bc64a6 100644
--- a/src/cpu/inorder/resources/mult_div_unit.hh
+++ b/src/cpu/inorder/resources/mult_div_unit.hh
@@ -32,15 +32,15 @@
#ifndef __CPU_INORDER_MULT_DIV_UNIT_HH__
#define __CPU_INORDER_MULT_DIV_UNIT_HH__
-#include <vector>
#include <list>
#include <string>
+#include <vector>
-#include "cpu/func_unit.hh"
-#include "cpu/op_class.hh"
#include "cpu/inorder/first_stage.hh"
-#include "cpu/inorder/resource.hh"
#include "cpu/inorder/inorder_dyn_inst.hh"
+#include "cpu/inorder/resource.hh"
+#include "cpu/func_unit.hh"
+#include "cpu/op_class.hh"
class MDUEvent;
diff --git a/src/cpu/inorder/resources/resource_list.hh b/src/cpu/inorder/resources/resource_list.hh
index 5568ad470..ae6b4ecaf 100644
--- a/src/cpu/inorder/resources/resource_list.hh
+++ b/src/cpu/inorder/resources/resource_list.hh
@@ -32,17 +32,17 @@
#ifndef CPU_INORDER_RESOURCE_LIST_HH
#define CPU_INORDER_RESOURCE_LIST_HH
+#include "cpu/inorder/resources/agen_unit.hh"
+#include "cpu/inorder/resources/branch_predictor.hh"
#include "cpu/inorder/resources/cache_unit.hh"
-#include "cpu/inorder/resources/fetch_unit.hh"
-#include "cpu/inorder/resources/execution_unit.hh"
-#include "cpu/inorder/resources/use_def.hh"
-#include "cpu/inorder/resources/inst_buffer.hh"
#include "cpu/inorder/resources/decode_unit.hh"
-#include "cpu/inorder/resources/graduation_unit.hh"
-#include "cpu/inorder/resources/tlb_unit.hh"
+#include "cpu/inorder/resources/execution_unit.hh"
#include "cpu/inorder/resources/fetch_seq_unit.hh"
-#include "cpu/inorder/resources/branch_predictor.hh"
-#include "cpu/inorder/resources/agen_unit.hh"
+#include "cpu/inorder/resources/fetch_unit.hh"
+#include "cpu/inorder/resources/graduation_unit.hh"
+#include "cpu/inorder/resources/inst_buffer.hh"
#include "cpu/inorder/resources/mult_div_unit.hh"
+#include "cpu/inorder/resources/tlb_unit.hh"
+#include "cpu/inorder/resources/use_def.hh"
#endif
diff --git a/src/cpu/inorder/resources/tlb_unit.cc b/src/cpu/inorder/resources/tlb_unit.cc
index 9a0c9fe32..c07f6ae5f 100644
--- a/src/cpu/inorder/resources/tlb_unit.cc
+++ b/src/cpu/inorder/resources/tlb_unit.cc
@@ -29,15 +29,15 @@
*
*/
-#include <vector>
#include <list>
+#include <vector>
#include "arch/isa_traits.hh"
#include "config/the_isa.hh"
-#include "cpu/inorder/pipeline_traits.hh"
-#include "cpu/inorder/first_stage.hh"
#include "cpu/inorder/resources/tlb_unit.hh"
#include "cpu/inorder/cpu.hh"
+#include "cpu/inorder/first_stage.hh"
+#include "cpu/inorder/pipeline_traits.hh"
using namespace std;
using namespace TheISA;
diff --git a/src/cpu/inorder/resources/tlb_unit.hh b/src/cpu/inorder/resources/tlb_unit.hh
index 904ac3eba..caccb5a9f 100644
--- a/src/cpu/inorder/resources/tlb_unit.hh
+++ b/src/cpu/inorder/resources/tlb_unit.hh
@@ -32,15 +32,15 @@
#ifndef __CPU_INORDER_TLB_UNIT_HH__
#define __CPU_INORDER_TLB_UNIT_HH__
-#include <vector>
#include <list>
#include <string>
+#include <vector>
#include "config/the_isa.hh"
#include "cpu/inorder/resources/inst_buffer.hh"
+#include "cpu/inorder/cpu.hh"
#include "cpu/inorder/inorder_dyn_inst.hh"
#include "cpu/inorder/pipeline_traits.hh"
-#include "cpu/inorder/cpu.hh"
class TLBUnit : public Resource
{
diff --git a/src/cpu/inorder/resources/use_def.cc b/src/cpu/inorder/resources/use_def.cc
index c687024ce..8a00ab704 100644
--- a/src/cpu/inorder/resources/use_def.cc
+++ b/src/cpu/inorder/resources/use_def.cc
@@ -29,14 +29,14 @@
*
*/
-#include <vector>
#include <list>
+#include <vector>
#include "arch/isa_traits.hh"
#include "config/the_isa.hh"
-#include "cpu/inorder/pipeline_traits.hh"
#include "cpu/inorder/resources/use_def.hh"
#include "cpu/inorder/cpu.hh"
+#include "cpu/inorder/pipeline_traits.hh"
using namespace std;
using namespace TheISA;
diff --git a/src/cpu/inorder/resources/use_def.hh b/src/cpu/inorder/resources/use_def.hh
index 21770cec6..bd423d01a 100644
--- a/src/cpu/inorder/resources/use_def.hh
+++ b/src/cpu/inorder/resources/use_def.hh
@@ -32,16 +32,16 @@
#ifndef __CPU_INORDER_USE_DEF_UNIT_HH__
#define __CPU_INORDER_USE_DEF_UNIT_HH__
-#include <vector>
#include <list>
#include <string>
+#include <vector>
-#include "cpu/func_unit.hh"
#include "cpu/inorder/first_stage.hh"
-#include "cpu/inorder/resource.hh"
#include "cpu/inorder/inorder_dyn_inst.hh"
#include "cpu/inorder/pipeline_traits.hh"
#include "cpu/inorder/reg_dep_map.hh"
+#include "cpu/inorder/resource.hh"
+#include "cpu/func_unit.hh"
class UseDefUnit : public Resource {
public:
diff --git a/src/cpu/inorder/thread_context.cc b/src/cpu/inorder/thread_context.cc
index bbccf626a..636bcee22 100644
--- a/src/cpu/inorder/thread_context.cc
+++ b/src/cpu/inorder/thread_context.cc
@@ -31,8 +31,8 @@
#include "arch/isa_traits.hh"
#include "config/the_isa.hh"
-#include "cpu/exetrace.hh"
#include "cpu/inorder/thread_context.hh"
+#include "cpu/exetrace.hh"
using namespace TheISA;
diff --git a/src/cpu/inorder/thread_context.hh b/src/cpu/inorder/thread_context.hh
index 21f1e5835..d178fd1d5 100644
--- a/src/cpu/inorder/thread_context.hh
+++ b/src/cpu/inorder/thread_context.hh
@@ -33,10 +33,10 @@
#define __CPU_INORDER_THREAD_CONTEXT_HH__
#include "config/the_isa.hh"
+#include "cpu/inorder/cpu.hh"
+#include "cpu/inorder/thread_state.hh"
#include "cpu/exetrace.hh"
#include "cpu/thread_context.hh"
-#include "cpu/inorder/thread_state.hh"
-#include "cpu/inorder/cpu.hh"
class TranslatingPort;
diff --git a/src/cpu/inorder/thread_state.cc b/src/cpu/inorder/thread_state.cc
index b3a54efb1..b17f05c7d 100644
--- a/src/cpu/inorder/thread_state.cc
+++ b/src/cpu/inorder/thread_state.cc
@@ -30,9 +30,9 @@
*/
#include "arch/isa_traits.hh"
-#include "cpu/exetrace.hh"
-#include "cpu/inorder/thread_state.hh"
#include "cpu/inorder/cpu.hh"
+#include "cpu/inorder/thread_state.hh"
+#include "cpu/exetrace.hh"
using namespace TheISA;
diff --git a/src/cpu/intr_control.cc b/src/cpu/intr_control.cc
index de7f9245e..085dbe9ac 100644
--- a/src/cpu/intr_control.cc
+++ b/src/cpu/intr_control.cc
@@ -34,8 +34,8 @@
#include "base/trace.hh"
#include "cpu/base.hh"
-#include "cpu/thread_context.hh"
#include "cpu/intr_control.hh"
+#include "cpu/thread_context.hh"
#include "sim/sim_object.hh"
using namespace std;
diff --git a/src/cpu/intr_control.hh b/src/cpu/intr_control.hh
index 2a63cf608..ee7b3ea7f 100644
--- a/src/cpu/intr_control.hh
+++ b/src/cpu/intr_control.hh
@@ -33,13 +33,13 @@
#define __INTR_CONTROL_HH__
#include <vector>
+
#include "base/misc.hh"
#include "cpu/base.hh"
#include "params/IntrControl.hh"
#include "sim/sim_object.hh"
#include "sim/system.hh"
-
class IntrControl : public SimObject
{
public:
diff --git a/src/cpu/nativetrace.hh b/src/cpu/nativetrace.hh
index cc388d6bf..9869853c4 100644
--- a/src/cpu/nativetrace.hh
+++ b/src/cpu/nativetrace.hh
@@ -31,9 +31,10 @@
#ifndef __CPU_NATIVETRACE_HH__
#define __CPU_NATIVETRACE_HH__
-#include <errno.h>
#include <unistd.h>
+#include <cerrno>
+
#include "base/socket.hh"
#include "base/trace.hh"
#include "base/types.hh"
diff --git a/src/cpu/o3/base_dyn_inst.cc b/src/cpu/o3/base_dyn_inst.cc
index 510109d8a..5cf01f230 100644
--- a/src/cpu/o3/base_dyn_inst.cc
+++ b/src/cpu/o3/base_dyn_inst.cc
@@ -28,9 +28,9 @@
* Authors: Kevin Lim
*/
-#include "cpu/base_dyn_inst_impl.hh"
#include "cpu/o3/cpu.hh"
#include "cpu/o3/isa_specific.hh"
+#include "cpu/base_dyn_inst_impl.hh"
// Explicit instantiation
template class BaseDynInst<O3CPUImpl>;
diff --git a/src/cpu/o3/bpred_unit.hh b/src/cpu/o3/bpred_unit.hh
index 58b1147c9..84f2dc8c1 100644
--- a/src/cpu/o3/bpred_unit.hh
+++ b/src/cpu/o3/bpred_unit.hh
@@ -35,11 +35,11 @@
#include "base/statistics.hh"
#include "base/types.hh"
-#include "cpu/inst_seq.hh"
#include "cpu/pred/2bit_local.hh"
#include "cpu/pred/btb.hh"
#include "cpu/pred/ras.hh"
#include "cpu/pred/tournament.hh"
+#include "cpu/inst_seq.hh"
class DerivO3CPUParams;
diff --git a/src/cpu/o3/bpred_unit_impl.hh b/src/cpu/o3/bpred_unit_impl.hh
index 14d47df9f..44e6f4230 100644
--- a/src/cpu/o3/bpred_unit_impl.hh
+++ b/src/cpu/o3/bpred_unit_impl.hh
@@ -30,9 +30,9 @@
#include <algorithm>
+#include "arch/isa_traits.hh"
#include "arch/types.hh"
#include "arch/utility.hh"
-#include "arch/isa_traits.hh"
#include "base/trace.hh"
#include "base/traceflags.hh"
#include "config/the_isa.hh"
diff --git a/src/cpu/o3/checker_builder.cc b/src/cpu/o3/checker_builder.cc
index b9afb3f9f..5d0bd2ed2 100644
--- a/src/cpu/o3/checker_builder.cc
+++ b/src/cpu/o3/checker_builder.cc
@@ -31,9 +31,9 @@
#include <string>
#include "cpu/checker/cpu_impl.hh"
-#include "cpu/inst_seq.hh"
#include "cpu/o3/alpha/dyn_inst.hh"
#include "cpu/o3/alpha/impl.hh"
+#include "cpu/inst_seq.hh"
#include "params/O3Checker.hh"
#include "sim/process.hh"
#include "sim/sim_object.hh"
diff --git a/src/cpu/o3/commit.cc b/src/cpu/o3/commit.cc
index 637d59f52..8e3ec0635 100644
--- a/src/cpu/o3/commit.cc
+++ b/src/cpu/o3/commit.cc
@@ -28,7 +28,7 @@
* Authors: Kevin Lim
*/
-#include "cpu/o3/isa_specific.hh"
#include "cpu/o3/commit_impl.hh"
+#include "cpu/o3/isa_specific.hh"
template class DefaultCommit<O3CPUImpl>;
diff --git a/src/cpu/o3/commit.hh b/src/cpu/o3/commit.hh
index ff7b53440..2de381aeb 100644
--- a/src/cpu/o3/commit.hh
+++ b/src/cpu/o3/commit.hh
@@ -45,9 +45,9 @@
#define __CPU_O3_COMMIT_HH__
#include "base/statistics.hh"
-#include "cpu/timebuf.hh"
#include "cpu/exetrace.hh"
#include "cpu/inst_seq.hh"
+#include "cpu/timebuf.hh"
class DerivO3CPUParams;
diff --git a/src/cpu/o3/commit_impl.hh b/src/cpu/o3/commit_impl.hh
index e35c1bf29..a48e5f046 100644
--- a/src/cpu/o3/commit_impl.hh
+++ b/src/cpu/o3/commit_impl.hh
@@ -45,15 +45,15 @@
#include <string>
#include "arch/utility.hh"
-#include "base/cp_annotate.hh"
#include "base/loader/symtab.hh"
-#include "cpu/timebuf.hh"
+#include "base/cp_annotate.hh"
#include "config/full_system.hh"
#include "config/the_isa.hh"
#include "config/use_checker.hh"
-#include "cpu/exetrace.hh"
#include "cpu/o3/commit.hh"
#include "cpu/o3/thread_state.hh"
+#include "cpu/exetrace.hh"
+#include "cpu/timebuf.hh"
#include "params/DerivO3CPU.hh"
#if USE_CHECKER
diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc
index 4088f2399..565c68f7a 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -34,12 +34,12 @@
#include "config/full_system.hh"
#include "config/the_isa.hh"
#include "config/use_checker.hh"
+#include "cpu/o3/cpu.hh"
+#include "cpu/o3/isa_specific.hh"
+#include "cpu/o3/thread_context.hh"
#include "cpu/activity.hh"
#include "cpu/simple_thread.hh"
#include "cpu/thread_context.hh"
-#include "cpu/o3/isa_specific.hh"
-#include "cpu/o3/cpu.hh"
-#include "cpu/o3/thread_context.hh"
#include "enums/MemoryMode.hh"
#include "sim/core.hh"
#include "sim/stat_control.hh"
diff --git a/src/cpu/o3/cpu.hh b/src/cpu/o3/cpu.hh
index 69289996b..7e9c33717 100644
--- a/src/cpu/o3/cpu.hh
+++ b/src/cpu/o3/cpu.hh
@@ -42,21 +42,20 @@
#include "arch/types.hh"
#include "base/statistics.hh"
-#include "cpu/timebuf.hh"
#include "config/full_system.hh"
#include "config/the_isa.hh"
#include "config/use_checker.hh"
-#include "cpu/activity.hh"
-#include "cpu/base.hh"
-#include "cpu/simple_thread.hh"
#include "cpu/o3/comm.hh"
#include "cpu/o3/cpu_policy.hh"
#include "cpu/o3/scoreboard.hh"
#include "cpu/o3/thread_state.hh"
+#include "cpu/activity.hh"
+#include "cpu/base.hh"
+#include "cpu/simple_thread.hh"
+#include "cpu/timebuf.hh"
//#include "cpu/o3/thread_context.hh"
-#include "sim/process.hh"
-
#include "params/DerivO3CPU.hh"
+#include "sim/process.hh"
template <class>
class Checker;
diff --git a/src/cpu/o3/cpu_policy.hh b/src/cpu/o3/cpu_policy.hh
index c06c9a201..ed0c31133 100644
--- a/src/cpu/o3/cpu_policy.hh
+++ b/src/cpu/o3/cpu_policy.hh
@@ -32,24 +32,22 @@
#define __CPU_O3_CPU_POLICY_HH__
#include "cpu/o3/bpred_unit.hh"
+#include "cpu/o3/comm.hh"
+#include "cpu/o3/commit.hh"
+#include "cpu/o3/decode.hh"
+#include "cpu/o3/fetch.hh"
#include "cpu/o3/free_list.hh"
+#include "cpu/o3/iew.hh"
#include "cpu/o3/inst_queue.hh"
#include "cpu/o3/lsq.hh"
#include "cpu/o3/lsq_unit.hh"
#include "cpu/o3/mem_dep_unit.hh"
#include "cpu/o3/regfile.hh"
+#include "cpu/o3/rename.hh"
#include "cpu/o3/rename_map.hh"
#include "cpu/o3/rob.hh"
#include "cpu/o3/store_set.hh"
-#include "cpu/o3/commit.hh"
-#include "cpu/o3/decode.hh"
-#include "cpu/o3/fetch.hh"
-#include "cpu/o3/iew.hh"
-#include "cpu/o3/rename.hh"
-
-#include "cpu/o3/comm.hh"
-
/**
* Struct that defines the key classes to be used by the CPU. All
* classes use the typedefs defined here to determine what are the
diff --git a/src/cpu/o3/decode.cc b/src/cpu/o3/decode.cc
index 896e38331..9722a4fcd 100644
--- a/src/cpu/o3/decode.cc
+++ b/src/cpu/o3/decode.cc
@@ -28,7 +28,7 @@
* Authors: Kevin Lim
*/
-#include "cpu/o3/isa_specific.hh"
#include "cpu/o3/decode_impl.hh"
+#include "cpu/o3/isa_specific.hh"
template class DefaultDecode<O3CPUImpl>;
diff --git a/src/cpu/o3/dyn_inst.hh b/src/cpu/o3/dyn_inst.hh
index 487c284e6..2e434ea02 100644
--- a/src/cpu/o3/dyn_inst.hh
+++ b/src/cpu/o3/dyn_inst.hh
@@ -45,10 +45,10 @@
#include "arch/isa_traits.hh"
#include "config/the_isa.hh"
-#include "cpu/base_dyn_inst.hh"
-#include "cpu/inst_seq.hh"
#include "cpu/o3/cpu.hh"
#include "cpu/o3/isa_specific.hh"
+#include "cpu/base_dyn_inst.hh"
+#include "cpu/inst_seq.hh"
class Packet;
diff --git a/src/cpu/o3/fetch.cc b/src/cpu/o3/fetch.cc
index d809b07e4..fb08b0957 100644
--- a/src/cpu/o3/fetch.cc
+++ b/src/cpu/o3/fetch.cc
@@ -28,7 +28,7 @@
* Authors: Kevin Lim
*/
-#include "cpu/o3/isa_specific.hh"
#include "cpu/o3/fetch_impl.hh"
+#include "cpu/o3/isa_specific.hh"
template class DefaultFetch<O3CPUImpl>;
diff --git a/src/cpu/o3/fetch.hh b/src/cpu/o3/fetch.hh
index 4a4ac0902..53f0f631e 100644
--- a/src/cpu/o3/fetch.hh
+++ b/src/cpu/o3/fetch.hh
@@ -44,12 +44,12 @@
#ifndef __CPU_O3_FETCH_HH__
#define __CPU_O3_FETCH_HH__
-#include "arch/utility.hh"
#include "arch/predecoder.hh"
+#include "arch/utility.hh"
#include "base/statistics.hh"
-#include "cpu/timebuf.hh"
#include "config/the_isa.hh"
#include "cpu/pc_event.hh"
+#include "cpu/timebuf.hh"
#include "cpu/translation.hh"
#include "mem/packet.hh"
#include "mem/port.hh"
diff --git a/src/cpu/o3/fetch_impl.hh b/src/cpu/o3/fetch_impl.hh
index c611f0e49..806cf7916 100644
--- a/src/cpu/o3/fetch_impl.hh
+++ b/src/cpu/o3/fetch_impl.hh
@@ -50,8 +50,8 @@
#include "config/the_isa.hh"
#include "config/use_checker.hh"
#include "cpu/checker/cpu.hh"
-#include "cpu/exetrace.hh"
#include "cpu/o3/fetch.hh"
+#include "cpu/exetrace.hh"
#include "mem/packet.hh"
#include "mem/request.hh"
#include "params/DerivO3CPU.hh"
diff --git a/src/cpu/o3/free_list.cc b/src/cpu/o3/free_list.cc
index 1144238f4..88020a0a2 100644
--- a/src/cpu/o3/free_list.cc
+++ b/src/cpu/o3/free_list.cc
@@ -29,7 +29,6 @@
*/
#include "base/trace.hh"
-
#include "cpu/o3/free_list.hh"
SimpleFreeList::SimpleFreeList(ThreadID activeThreads,
diff --git a/src/cpu/o3/fu_pool.hh b/src/cpu/o3/fu_pool.hh
index 20d742cc8..ea4b53e1a 100644
--- a/src/cpu/o3/fu_pool.hh
+++ b/src/cpu/o3/fu_pool.hh
@@ -36,8 +36,8 @@
#include <string>
#include <vector>
-#include "cpu/sched_list.hh"
#include "cpu/op_class.hh"
+#include "cpu/sched_list.hh"
#include "params/FUPool.hh"
#include "sim/sim_object.hh"
diff --git a/src/cpu/o3/iew.cc b/src/cpu/o3/iew.cc
index f99be7fe0..9bf2db4d0 100644
--- a/src/cpu/o3/iew.cc
+++ b/src/cpu/o3/iew.cc
@@ -28,8 +28,8 @@
* Authors: Kevin Lim
*/
-#include "cpu/o3/isa_specific.hh"
#include "cpu/o3/iew_impl.hh"
#include "cpu/o3/inst_queue.hh"
+#include "cpu/o3/isa_specific.hh"
template class DefaultIEW<O3CPUImpl>;
diff --git a/src/cpu/o3/iew.hh b/src/cpu/o3/iew.hh
index 6599964b6..d157b4383 100644
--- a/src/cpu/o3/iew.hh
+++ b/src/cpu/o3/iew.hh
@@ -46,11 +46,11 @@
#include <queue>
#include "base/statistics.hh"
-#include "cpu/timebuf.hh"
#include "config/full_system.hh"
#include "cpu/o3/comm.hh"
-#include "cpu/o3/scoreboard.hh"
#include "cpu/o3/lsq.hh"
+#include "cpu/o3/scoreboard.hh"
+#include "cpu/timebuf.hh"
class DerivO3CPUParams;
class FUPool;
diff --git a/src/cpu/o3/iew_impl.hh b/src/cpu/o3/iew_impl.hh
index 8bf3c56f4..8b1bd4d00 100644
--- a/src/cpu/o3/iew_impl.hh
+++ b/src/cpu/o3/iew_impl.hh
@@ -46,10 +46,10 @@
#include <queue>
-#include "cpu/timebuf.hh"
#include "config/the_isa.hh"
#include "cpu/o3/fu_pool.hh"
#include "cpu/o3/iew.hh"
+#include "cpu/timebuf.hh"
#include "params/DerivO3CPU.hh"
using namespace std;
diff --git a/src/cpu/o3/impl.hh b/src/cpu/o3/impl.hh
index ffccd4a84..8905bdb1c 100644
--- a/src/cpu/o3/impl.hh
+++ b/src/cpu/o3/impl.hh
@@ -35,7 +35,6 @@
#include "config/the_isa.hh"
#include "cpu/o3/cpu_policy.hh"
-
// Forward declarations.
template <class Impl>
class BaseO3DynInst;
diff --git a/src/cpu/o3/inst_queue.cc b/src/cpu/o3/inst_queue.cc
index a539066f9..cbc3d2e82 100644
--- a/src/cpu/o3/inst_queue.cc
+++ b/src/cpu/o3/inst_queue.cc
@@ -28,8 +28,8 @@
* Authors: Kevin Lim
*/
-#include "cpu/o3/isa_specific.hh"
#include "cpu/o3/inst_queue_impl.hh"
+#include "cpu/o3/isa_specific.hh"
// Force instantiation of InstructionQueue.
template class InstructionQueue<O3CPUImpl>;
diff --git a/src/cpu/o3/inst_queue.hh b/src/cpu/o3/inst_queue.hh
index 64df35743..eb35fd285 100644
--- a/src/cpu/o3/inst_queue.hh
+++ b/src/cpu/o3/inst_queue.hh
@@ -49,11 +49,11 @@
#include <vector>
#include "base/statistics.hh"
-#include "cpu/timebuf.hh"
#include "base/types.hh"
-#include "cpu/inst_seq.hh"
#include "cpu/o3/dep_graph.hh"
+#include "cpu/inst_seq.hh"
#include "cpu/op_class.hh"
+#include "cpu/timebuf.hh"
#include "sim/eventq.hh"
class DerivO3CPUParams;
diff --git a/src/cpu/o3/isa_specific.hh b/src/cpu/o3/isa_specific.hh
index e9347af91..9bae3fd15 100755
--- a/src/cpu/o3/isa_specific.hh
+++ b/src/cpu/o3/isa_specific.hh
@@ -28,7 +28,6 @@
* Authors: Korey Sewell
*/
-#include "cpu/base.hh"
-
-#include "cpu/o3/impl.hh"
#include "cpu/o3/dyn_inst.hh"
+#include "cpu/o3/impl.hh"
+#include "cpu/base.hh"
diff --git a/src/cpu/o3/lsq.hh b/src/cpu/o3/lsq.hh
index 0ad5d51c2..14917bc16 100644
--- a/src/cpu/o3/lsq.hh
+++ b/src/cpu/o3/lsq.hh
@@ -35,8 +35,8 @@
#include <queue>
#include "config/full_system.hh"
-#include "cpu/inst_seq.hh"
#include "cpu/o3/lsq_unit.hh"
+#include "cpu/inst_seq.hh"
#include "mem/port.hh"
#include "sim/sim_object.hh"
diff --git a/src/cpu/o3/lsq_unit.hh b/src/cpu/o3/lsq_unit.hh
index bdc524dec..36c2ff8c8 100644
--- a/src/cpu/o3/lsq_unit.hh
+++ b/src/cpu/o3/lsq_unit.hh
@@ -39,10 +39,10 @@
#include "arch/faults.hh"
#include "arch/locked_mem.hh"
-#include "config/full_system.hh"
-#include "config/the_isa.hh"
#include "base/fast_alloc.hh"
#include "base/hashmap.hh"
+#include "config/full_system.hh"
+#include "config/the_isa.hh"
#include "cpu/inst_seq.hh"
#include "mem/packet.hh"
#include "mem/port.hh"
diff --git a/src/cpu/o3/lsq_unit_impl.hh b/src/cpu/o3/lsq_unit_impl.hh
index 70b87ff26..6a366d056 100644
--- a/src/cpu/o3/lsq_unit_impl.hh
+++ b/src/cpu/o3/lsq_unit_impl.hh
@@ -42,11 +42,11 @@
*/
#include "arch/locked_mem.hh"
+#include "base/str.hh"
#include "config/the_isa.hh"
#include "config/use_checker.hh"
#include "cpu/o3/lsq.hh"
#include "cpu/o3/lsq_unit.hh"
-#include "base/str.hh"
#include "mem/packet.hh"
#include "mem/request.hh"
diff --git a/src/cpu/o3/mem_dep_unit.cc b/src/cpu/o3/mem_dep_unit.cc
index 6a14dcbff..ac0db4784 100644
--- a/src/cpu/o3/mem_dep_unit.cc
+++ b/src/cpu/o3/mem_dep_unit.cc
@@ -29,8 +29,8 @@
*/
#include "cpu/o3/isa_specific.hh"
-#include "cpu/o3/store_set.hh"
#include "cpu/o3/mem_dep_unit_impl.hh"
+#include "cpu/o3/store_set.hh"
// Force instantation of memory dependency unit using store sets and
// O3CPUImpl.
diff --git a/src/cpu/o3/rename.hh b/src/cpu/o3/rename.hh
index 901283111..e2472a62d 100644
--- a/src/cpu/o3/rename.hh
+++ b/src/cpu/o3/rename.hh
@@ -34,8 +34,8 @@
#include <list>
#include "base/statistics.hh"
-#include "cpu/timebuf.hh"
#include "config/the_isa.hh"
+#include "cpu/timebuf.hh"
class DerivO3CPUParams;
diff --git a/src/cpu/o3/scoreboard.hh b/src/cpu/o3/scoreboard.hh
index b1c2bd026..4789e2181 100644
--- a/src/cpu/o3/scoreboard.hh
+++ b/src/cpu/o3/scoreboard.hh
@@ -35,6 +35,7 @@
#include <iostream>
#include <utility>
#include <vector>
+
#include "base/trace.hh"
#include "base/traceflags.hh"
#include "cpu/o3/comm.hh"
diff --git a/src/cpu/o3/thread_context.cc b/src/cpu/o3/thread_context.cc
index 0d8c67643..7ca716dd1 100755
--- a/src/cpu/o3/thread_context.cc
+++ b/src/cpu/o3/thread_context.cc
@@ -28,9 +28,9 @@
* Authors: Kevin Lim
*/
+#include "cpu/o3/impl.hh"
#include "cpu/o3/thread_context.hh"
#include "cpu/o3/thread_context_impl.hh"
-#include "cpu/o3/impl.hh"
template class O3ThreadContext<O3CPUImpl>;
diff --git a/src/cpu/o3/thread_context.hh b/src/cpu/o3/thread_context.hh
index 4e559000b..ef0fdbb4d 100755
--- a/src/cpu/o3/thread_context.hh
+++ b/src/cpu/o3/thread_context.hh
@@ -32,8 +32,8 @@
#define __CPU_O3_THREAD_CONTEXT_HH__
#include "config/the_isa.hh"
-#include "cpu/thread_context.hh"
#include "cpu/o3/isa_specific.hh"
+#include "cpu/thread_context.hh"
class EndQuiesceEvent;
namespace Kernel {
diff --git a/src/cpu/ozone/back_end.hh b/src/cpu/ozone/back_end.hh
index 95e079d0d..90a336d1b 100644
--- a/src/cpu/ozone/back_end.hh
+++ b/src/cpu/ozone/back_end.hh
@@ -35,13 +35,13 @@
#include <queue>
#include <string>
-#include "sim/faults.hh"
-#include "cpu/timebuf.hh"
-#include "cpu/inst_seq.hh"
#include "cpu/ozone/rename_table.hh"
#include "cpu/ozone/thread_state.hh"
+#include "cpu/inst_seq.hh"
+#include "cpu/timebuf.hh"
#include "mem/request.hh"
#include "sim/eventq.hh"
+#include "sim/faults.hh"
class ThreadContext;
diff --git a/src/cpu/ozone/back_end_impl.hh b/src/cpu/ozone/back_end_impl.hh
index fbb363a96..169f328ad 100644
--- a/src/cpu/ozone/back_end_impl.hh
+++ b/src/cpu/ozone/back_end_impl.hh
@@ -28,8 +28,8 @@
* Authors: Kevin Lim
*/
-#include "encumbered/cpu/full/op_class.hh"
#include "cpu/ozone/back_end.hh"
+#include "encumbered/cpu/full/op_class.hh"
template <class Impl>
BackEnd<Impl>::InstQueue::InstQueue(Params *params)
diff --git a/src/cpu/ozone/base_dyn_inst.cc b/src/cpu/ozone/base_dyn_inst.cc
index e0570fd16..9fdb9d22e 100644
--- a/src/cpu/ozone/base_dyn_inst.cc
+++ b/src/cpu/ozone/base_dyn_inst.cc
@@ -28,8 +28,8 @@
* Authors: Kevin Lim
*/
-#include "cpu/base_dyn_inst_impl.hh"
#include "cpu/ozone/ozone_impl.hh"
+#include "cpu/base_dyn_inst_impl.hh"
// Explicit instantiation
template class BaseDynInst<OzoneImpl>;
diff --git a/src/cpu/ozone/checker_builder.cc b/src/cpu/ozone/checker_builder.cc
index 37b9f951a..6baa95658 100644
--- a/src/cpu/ozone/checker_builder.cc
+++ b/src/cpu/ozone/checker_builder.cc
@@ -31,9 +31,9 @@
#include <string>
#include "cpu/checker/cpu_impl.hh"
-#include "cpu/inst_seq.hh"
#include "cpu/ozone/dyn_inst.hh"
#include "cpu/ozone/ozone_impl.hh"
+#include "cpu/inst_seq.hh"
#include "params/OzoneChecker.hh"
#include "sim/process.hh"
#include "sim/sim_object.hh"
diff --git a/src/cpu/ozone/cpu.hh b/src/cpu/ozone/cpu.hh
index 1b196feb4..1867a4c51 100644
--- a/src/cpu/ozone/cpu.hh
+++ b/src/cpu/ozone/cpu.hh
@@ -34,16 +34,16 @@
#include <set>
#include "base/statistics.hh"
-#include "cpu/timebuf.hh"
#include "config/full_system.hh"
#include "config/the_isa.hh"
-#include "cpu/base.hh"
-#include "cpu/thread_context.hh"
-#include "cpu/inst_seq.hh"
#include "cpu/ozone/rename_table.hh"
#include "cpu/ozone/thread_state.hh"
+#include "cpu/base.hh"
+#include "cpu/inst_seq.hh"
#include "cpu/pc_event.hh"
#include "cpu/static_inst.hh"
+#include "cpu/thread_context.hh"
+#include "cpu/timebuf.hh"
#include "mem/page_table.hh"
#include "sim/eventq.hh"
diff --git a/src/cpu/ozone/cpu_builder.cc b/src/cpu/ozone/cpu_builder.cc
index 9cac3a524..63b7eb6ff 100644
--- a/src/cpu/ozone/cpu_builder.cc
+++ b/src/cpu/ozone/cpu_builder.cc
@@ -31,10 +31,10 @@
#include <string>
#include "cpu/checker/cpu.hh"
-#include "cpu/inst_seq.hh"
#include "cpu/ozone/cpu.hh"
#include "cpu/ozone/ozone_impl.hh"
#include "cpu/ozone/simple_params.hh"
+#include "cpu/inst_seq.hh"
#include "params/DerivOzoneCPU.hh"
#include "sim/process.hh"
#include "sim/sim_object.hh"
diff --git a/src/cpu/ozone/cpu_impl.hh b/src/cpu/ozone/cpu_impl.hh
index dd6c3dcf1..bb6e96ecc 100644
--- a/src/cpu/ozone/cpu_impl.hh
+++ b/src/cpu/ozone/cpu_impl.hh
@@ -29,28 +29,27 @@
* Nathan Binkert
*/
-#include "config/full_system.hh"
-#include "config/use_checker.hh"
-
#include "arch/isa_traits.hh" // For MachInst
#include "base/trace.hh"
+#include "config/full_system.hh"
#include "config/the_isa.hh"
+#include "config/use_checker.hh"
+#include "cpu/ozone/cpu.hh"
#include "cpu/base.hh"
-#include "cpu/simple_thread.hh"
-#include "cpu/thread_context.hh"
#include "cpu/exetrace.hh"
-#include "cpu/ozone/cpu.hh"
#include "cpu/quiesce_event.hh"
+#include "cpu/simple_thread.hh"
#include "cpu/static_inst.hh"
+#include "cpu/thread_context.hh"
#include "sim/sim_object.hh"
#include "sim/stats.hh"
#if FULL_SYSTEM
-#include "arch/faults.hh"
#include "arch/alpha/osfpal.hh"
+#include "arch/faults.hh"
+#include "arch/kernel_stats.hh"
#include "arch/tlb.hh"
#include "arch/types.hh"
-#include "arch/kernel_stats.hh"
#include "arch/vtophys.hh"
#include "base/callback.hh"
#include "cpu/profile.hh"
diff --git a/src/cpu/ozone/dyn_inst.hh b/src/cpu/ozone/dyn_inst.hh
index cca72ef18..c1853b1ed 100644
--- a/src/cpu/ozone/dyn_inst.hh
+++ b/src/cpu/ozone/dyn_inst.hh
@@ -31,17 +31,17 @@
#ifndef __CPU_OZONE_DYN_INST_HH__
#define __CPU_OZONE_DYN_INST_HH__
+#include <list>
+#include <vector>
+
#include "arch/isa_traits.hh"
#include "arch/types.hh"
#include "config/full_system.hh"
#include "config/the_isa.hh"
-#include "cpu/base_dyn_inst.hh"
-#include "cpu/inst_seq.hh"
#include "cpu/ozone/cpu.hh" // MUST include this
#include "cpu/ozone/ozone_impl.hh"
-
-#include <list>
-#include <vector>
+#include "cpu/base_dyn_inst.hh"
+#include "cpu/inst_seq.hh"
template <class Impl>
class OzoneDynInst : public BaseDynInst<Impl>
diff --git a/src/cpu/ozone/dyn_inst_impl.hh b/src/cpu/ozone/dyn_inst_impl.hh
index bfefb9428..002b39fa2 100644
--- a/src/cpu/ozone/dyn_inst_impl.hh
+++ b/src/cpu/ozone/dyn_inst_impl.hh
@@ -28,10 +28,10 @@
* Authors: Kevin Lim
*/
-#include "sim/faults.hh"
#include "config/full_system.hh"
#include "config/the_isa.hh"
#include "cpu/ozone/dyn_inst.hh"
+#include "sim/faults.hh"
#if FULL_SYSTEM
#include "kern/kernel_stats.hh"
diff --git a/src/cpu/ozone/ea_list.cc b/src/cpu/ozone/ea_list.cc
index 5ef240700..4fc6c0a5f 100644
--- a/src/cpu/ozone/ea_list.cc
+++ b/src/cpu/ozone/ea_list.cc
@@ -30,8 +30,8 @@
*/
#include "arch/isa_traits.hh"
-#include "cpu/inst_seq.hh"
#include "cpu/ooo_cpu/ea_list.hh"
+#include "cpu/inst_seq.hh"
void
EAList::addAddr(const InstSeqNum &new_sn, const Addr &new_ea)
diff --git a/src/cpu/ozone/front_end.hh b/src/cpu/ozone/front_end.hh
index 7f400e82a..1d200ef7d 100644
--- a/src/cpu/ozone/front_end.hh
+++ b/src/cpu/ozone/front_end.hh
@@ -34,11 +34,11 @@
#include <deque>
#include "arch/utility.hh"
-#include "cpu/timebuf.hh"
#include "config/the_isa.hh"
-#include "cpu/inst_seq.hh"
#include "cpu/o3/bpred_unit.hh"
#include "cpu/ozone/rename_table.hh"
+#include "cpu/inst_seq.hh"
+#include "cpu/timebuf.hh"
#include "mem/port.hh"
#include "mem/request.hh"
#include "sim/eventq.hh"
diff --git a/src/cpu/ozone/front_end_impl.hh b/src/cpu/ozone/front_end_impl.hh
index d7ed0b77a..5d8919d4e 100644
--- a/src/cpu/ozone/front_end_impl.hh
+++ b/src/cpu/ozone/front_end_impl.hh
@@ -28,18 +28,18 @@
* Authors: Kevin Lim
*/
-#include "sim/faults.hh"
#include "arch/isa_traits.hh"
#include "arch/utility.hh"
#include "base/statistics.hh"
#include "config/the_isa.hh"
#include "config/use_checker.hh"
-#include "cpu/thread_context.hh"
-#include "cpu/exetrace.hh"
#include "cpu/ozone/front_end.hh"
+#include "cpu/exetrace.hh"
+#include "cpu/thread_context.hh"
#include "mem/mem_object.hh"
#include "mem/packet.hh"
#include "mem/request.hh"
+#include "sim/faults.hh"
#if USE_CHECKER
#include "cpu/checker/cpu.hh"
diff --git a/src/cpu/ozone/inorder_back_end.hh b/src/cpu/ozone/inorder_back_end.hh
index fcdc2a38a..5c2f9c28f 100644
--- a/src/cpu/ozone/inorder_back_end.hh
+++ b/src/cpu/ozone/inorder_back_end.hh
@@ -33,14 +33,14 @@
#include <list>
-#include "sim/faults.hh"
-#include "cpu/timebuf.hh"
-#include "cpu/thread_context.hh"
-#include "cpu/inst_seq.hh"
#include "cpu/ozone/rename_table.hh"
#include "cpu/ozone/thread_state.hh"
+#include "cpu/inst_seq.hh"
+#include "cpu/thread_context.hh"
+#include "cpu/timebuf.hh"
#include "mem/request.hh"
#include "sim/eventq.hh"
+#include "sim/faults.hh"
template <class Impl>
class InorderBackEnd
diff --git a/src/cpu/ozone/inorder_back_end_impl.hh b/src/cpu/ozone/inorder_back_end_impl.hh
index b48e8f692..13c066fd2 100644
--- a/src/cpu/ozone/inorder_back_end_impl.hh
+++ b/src/cpu/ozone/inorder_back_end_impl.hh
@@ -28,11 +28,11 @@
* Authors: Kevin Lim
*/
-#include "sim/faults.hh"
#include "arch/types.hh"
#include "config/the_isa.hh"
#include "cpu/ozone/inorder_back_end.hh"
#include "cpu/ozone/thread_state.hh"
+#include "sim/faults.hh"
template <class Impl>
InorderBackEnd<Impl>::InorderBackEnd(Params *params)
diff --git a/src/cpu/ozone/inst_queue.cc b/src/cpu/ozone/inst_queue.cc
index 7ce5d67ad..5fd41d7c6 100644
--- a/src/cpu/ozone/inst_queue.cc
+++ b/src/cpu/ozone/inst_queue.cc
@@ -29,9 +29,9 @@
*/
#include "cpu/ozone/dyn_inst.hh"
+#include "cpu/ozone/inst_queue_impl.hh"
#include "cpu/ozone/ozone_impl.hh"
#include "cpu/ozone/simple_impl.hh"
-#include "cpu/ozone/inst_queue_impl.hh"
// Force instantiation of InstructionQueue.
template class InstQueue<SimpleImpl>;
diff --git a/src/cpu/ozone/inst_queue.hh b/src/cpu/ozone/inst_queue.hh
index fb302f01e..ef207e792 100644
--- a/src/cpu/ozone/inst_queue.hh
+++ b/src/cpu/ozone/inst_queue.hh
@@ -37,9 +37,9 @@
#include <vector>
#include "base/statistics.hh"
-#include "cpu/timebuf.hh"
#include "base/types.hh"
#include "cpu/inst_seq.hh"
+#include "cpu/timebuf.hh"
class FUPool;
class MemInterface;
diff --git a/src/cpu/ozone/inst_queue_impl.hh b/src/cpu/ozone/inst_queue_impl.hh
index 0068f2977..f2f88760b 100644
--- a/src/cpu/ozone/inst_queue_impl.hh
+++ b/src/cpu/ozone/inst_queue_impl.hh
@@ -38,9 +38,8 @@
#include <vector>
-#include "sim/core.hh"
-
#include "cpu/ozone/inst_queue.hh"
+#include "sim/core.hh"
#if 0
template <class Impl>
InstQueue<Impl>::FUCompletion::FUCompletion(DynInstPtr &_inst,
diff --git a/src/cpu/ozone/lsq_unit.cc b/src/cpu/ozone/lsq_unit.cc
index e37971dba..b473513ae 100644
--- a/src/cpu/ozone/lsq_unit.cc
+++ b/src/cpu/ozone/lsq_unit.cc
@@ -28,8 +28,8 @@
* Authors: Kevin Lim
*/
-#include "cpu/ozone/ozone_impl.hh"
#include "cpu/ozone/lsq_unit_impl.hh"
+#include "cpu/ozone/ozone_impl.hh"
// Force the instantiation of LDSTQ for all the implementations we care about.
template class OzoneLSQ<OzoneImpl>;
diff --git a/src/cpu/ozone/lsq_unit.hh b/src/cpu/ozone/lsq_unit.hh
index 0216c5013..1d8328610 100644
--- a/src/cpu/ozone/lsq_unit.hh
+++ b/src/cpu/ozone/lsq_unit.hh
@@ -31,15 +31,15 @@
#ifndef __CPU_OZONE_LSQ_UNIT_HH__
#define __CPU_OZONE_LSQ_UNIT_HH__
+#include <algorithm>
#include <map>
#include <queue>
-#include <algorithm>
#include "arch/faults.hh"
#include "arch/types.hh"
+#include "base/hashmap.hh"
#include "config/full_system.hh"
#include "config/the_isa.hh"
-#include "base/hashmap.hh"
#include "cpu/inst_seq.hh"
#include "mem/mem_interface.hh"
//#include "mem/page_table.hh"
diff --git a/src/cpu/ozone/lw_back_end.hh b/src/cpu/ozone/lw_back_end.hh
index 4c6eb5fb6..adb4f276a 100644
--- a/src/cpu/ozone/lw_back_end.hh
+++ b/src/cpu/ozone/lw_back_end.hh
@@ -36,13 +36,13 @@
#include <set>
#include <string>
-#include "sim/faults.hh"
-#include "cpu/timebuf.hh"
-#include "cpu/inst_seq.hh"
#include "cpu/ozone/rename_table.hh"
#include "cpu/ozone/thread_state.hh"
+#include "cpu/inst_seq.hh"
+#include "cpu/timebuf.hh"
#include "mem/request.hh"
#include "sim/eventq.hh"
+#include "sim/faults.hh"
template <class>
class Checker;
diff --git a/src/cpu/ozone/lw_lsq.cc b/src/cpu/ozone/lw_lsq.cc
index 8674e83a0..79dc0db31 100644
--- a/src/cpu/ozone/lw_lsq.cc
+++ b/src/cpu/ozone/lw_lsq.cc
@@ -28,8 +28,8 @@
* Authors: Kevin Lim
*/
-#include "cpu/ozone/ozone_impl.hh"
#include "cpu/ozone/lw_lsq_impl.hh"
+#include "cpu/ozone/ozone_impl.hh"
// Force the instantiation of LDSTQ for all the implementations we care about.
template class OzoneLWLSQ<OzoneImpl>;
diff --git a/src/cpu/ozone/lw_lsq.hh b/src/cpu/ozone/lw_lsq.hh
index 9605f175e..4817622f5 100644
--- a/src/cpu/ozone/lw_lsq.hh
+++ b/src/cpu/ozone/lw_lsq.hh
@@ -31,17 +31,17 @@
#ifndef __CPU_OZONE_LW_LSQ_HH__
#define __CPU_OZONE_LW_LSQ_HH__
+#include <algorithm>
#include <list>
#include <map>
#include <queue>
-#include <algorithm>
#include "arch/faults.hh"
#include "arch/types.hh"
-#include "config/full_system.hh"
-#include "config/the_isa.hh"
#include "base/fast_alloc.hh"
#include "base/hashmap.hh"
+#include "config/full_system.hh"
+#include "config/the_isa.hh"
#include "cpu/inst_seq.hh"
#include "mem/packet.hh"
#include "mem/port.hh"
diff --git a/src/cpu/ozone/lw_lsq_impl.hh b/src/cpu/ozone/lw_lsq_impl.hh
index 0c4e4b9c7..3bee83176 100644
--- a/src/cpu/ozone/lw_lsq_impl.hh
+++ b/src/cpu/ozone/lw_lsq_impl.hh
@@ -32,8 +32,8 @@
#include "base/str.hh"
#include "config/the_isa.hh"
#include "config/use_checker.hh"
-#include "cpu/ozone/lw_lsq.hh"
#include "cpu/checker/cpu.hh"
+#include "cpu/ozone/lw_lsq.hh"
template<class Impl>
OzoneLWLSQ<Impl>::WritebackEvent::WritebackEvent(DynInstPtr &_inst, PacketPtr _pkt,
diff --git a/src/cpu/ozone/ozone_base_dyn_inst.cc b/src/cpu/ozone/ozone_base_dyn_inst.cc
index 5a3a69dff..0bcd31760 100644
--- a/src/cpu/ozone/ozone_base_dyn_inst.cc
+++ b/src/cpu/ozone/ozone_base_dyn_inst.cc
@@ -28,8 +28,8 @@
* Authors: Kevin Lim
*/
-#include "cpu/base_dyn_inst_impl.hh"
#include "cpu/ozone/ozone_impl.hh"
+#include "cpu/base_dyn_inst_impl.hh"
// Explicit instantiation
template class BaseDynInst<OzoneImpl>;
diff --git a/src/cpu/ozone/ozone_impl.hh b/src/cpu/ozone/ozone_impl.hh
index 2271cd68a..294aecfae 100644
--- a/src/cpu/ozone/ozone_impl.hh
+++ b/src/cpu/ozone/ozone_impl.hh
@@ -32,12 +32,12 @@
#define __CPU_OZONE_OZONE_IMPL_HH__
#include "cpu/o3/bpred_unit.hh"
+#include "cpu/ozone/dyn_inst.hh"
#include "cpu/ozone/front_end.hh"
#include "cpu/ozone/inst_queue.hh"
-#include "cpu/ozone/lw_lsq.hh"
#include "cpu/ozone/lw_back_end.hh"
+#include "cpu/ozone/lw_lsq.hh"
#include "cpu/ozone/null_predictor.hh"
-#include "cpu/ozone/dyn_inst.hh"
#include "cpu/ozone/simple_params.hh"
template <class Impl>
diff --git a/src/cpu/ozone/rename_table.cc b/src/cpu/ozone/rename_table.cc
index a44054b6e..4e5505ff2 100644
--- a/src/cpu/ozone/rename_table.cc
+++ b/src/cpu/ozone/rename_table.cc
@@ -28,8 +28,8 @@
* Authors: Kevin Lim
*/
-#include "cpu/ozone/rename_table_impl.hh"
#include "cpu/ozone/ozone_impl.hh"
+#include "cpu/ozone/rename_table_impl.hh"
//#include "cpu/ozone/simple_impl.hh"
template class RenameTable<OzoneImpl>;
diff --git a/src/cpu/ozone/simple_base_dyn_inst.cc b/src/cpu/ozone/simple_base_dyn_inst.cc
index fdaeaf57e..c2ac1185a 100644
--- a/src/cpu/ozone/simple_base_dyn_inst.cc
+++ b/src/cpu/ozone/simple_base_dyn_inst.cc
@@ -28,8 +28,8 @@
* Authors: Kevin Lim
*/
-#include "cpu/base_dyn_inst_impl.hh"
#include "cpu/ozone/simple_impl.hh"
+#include "cpu/base_dyn_inst_impl.hh"
// Explicit instantiation
template class BaseDynInst<SimpleImpl>;
diff --git a/src/cpu/ozone/simple_cpu_builder.cc b/src/cpu/ozone/simple_cpu_builder.cc
index 2fc7c10d0..f4446ede3 100644
--- a/src/cpu/ozone/simple_cpu_builder.cc
+++ b/src/cpu/ozone/simple_cpu_builder.cc
@@ -31,10 +31,10 @@
#include <string>
#include "cpu/checker/cpu.hh"
-#include "cpu/inst_seq.hh"
#include "cpu/ozone/cpu_impl.hh"
#include "cpu/ozone/simple_impl.hh"
#include "cpu/ozone/simple_params.hh"
+#include "cpu/inst_seq.hh"
#include "mem/cache/base.hh"
#include "sim/SimpleOzoneCPU.hh"
#include "sim/process.hh"
diff --git a/src/cpu/ozone/simple_impl.hh b/src/cpu/ozone/simple_impl.hh
index 42002180b..c18395515 100644
--- a/src/cpu/ozone/simple_impl.hh
+++ b/src/cpu/ozone/simple_impl.hh
@@ -33,10 +33,10 @@
#include "cpu/o3/bpred_unit.hh"
#include "cpu/ozone/cpu.hh"
+#include "cpu/ozone/dyn_inst.hh"
#include "cpu/ozone/front_end.hh"
#include "cpu/ozone/inorder_back_end.hh"
#include "cpu/ozone/null_predictor.hh"
-#include "cpu/ozone/dyn_inst.hh"
#include "cpu/ozone/simple_params.hh"
//template <class Impl>
diff --git a/src/cpu/pc_event.cc b/src/cpu/pc_event.cc
index 09bd66819..40432ed93 100644
--- a/src/cpu/pc_event.cc
+++ b/src/cpu/pc_event.cc
@@ -38,8 +38,8 @@
#include "base/trace.hh"
#include "config/full_system.hh"
#include "cpu/base.hh"
-#include "cpu/thread_context.hh"
#include "cpu/pc_event.hh"
+#include "cpu/thread_context.hh"
#include "sim/core.hh"
#include "sim/system.hh"
diff --git a/src/cpu/profile.cc b/src/cpu/profile.cc
index 4f04615e9..79ae22ca1 100644
--- a/src/cpu/profile.cc
+++ b/src/cpu/profile.cc
@@ -30,14 +30,14 @@
#include <string>
+#include "base/loader/symtab.hh"
#include "base/bitfield.hh"
#include "base/callback.hh"
#include "base/statistics.hh"
#include "base/trace.hh"
-#include "base/loader/symtab.hh"
#include "cpu/base.hh"
-#include "cpu/thread_context.hh"
#include "cpu/profile.hh"
+#include "cpu/thread_context.hh"
using namespace std;
diff --git a/src/cpu/profile.hh b/src/cpu/profile.hh
index dd856b5a7..8fb0e3a8e 100644
--- a/src/cpu/profile.hh
+++ b/src/cpu/profile.hh
@@ -34,9 +34,9 @@
#include <map>
#include "arch/stacktrace.hh"
+#include "base/types.hh"
#include "config/the_isa.hh"
#include "cpu/static_inst.hh"
-#include "base/types.hh"
class ThreadContext;
diff --git a/src/cpu/quiesce_event.cc b/src/cpu/quiesce_event.cc
index 38ffb74e4..79068985b 100644
--- a/src/cpu/quiesce_event.cc
+++ b/src/cpu/quiesce_event.cc
@@ -29,8 +29,8 @@
*/
#include "cpu/base.hh"
-#include "cpu/thread_context.hh"
#include "cpu/quiesce_event.hh"
+#include "cpu/thread_context.hh"
EndQuiesceEvent::EndQuiesceEvent(ThreadContext *_tc)
: tc(_tc)
diff --git a/src/cpu/sched_list.hh b/src/cpu/sched_list.hh
index 56ee2f8ec..4d3b0dd71 100644
--- a/src/cpu/sched_list.hh
+++ b/src/cpu/sched_list.hh
@@ -32,10 +32,10 @@
#define SCHED_LIST_HH
#include <list>
+
#include "base/intmath.hh"
#include "base/misc.hh"
-
// Any types you use this class for must be covered here...
namespace {
void ClearEntry(int &i) { i = 0; };
diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc
index 6aa0eb64e..c5730e137 100644
--- a/src/cpu/simple/atomic.cc
+++ b/src/cpu/simple/atomic.cc
@@ -33,8 +33,8 @@
#include "arch/utility.hh"
#include "base/bigint.hh"
#include "config/the_isa.hh"
-#include "cpu/exetrace.hh"
#include "cpu/simple/atomic.hh"
+#include "cpu/exetrace.hh"
#include "mem/packet.hh"
#include "mem/packet_access.hh"
#include "params/AtomicSimpleCPU.hh"
diff --git a/src/cpu/simple/base.cc b/src/cpu/simple/base.cc
index 8d7a1b119..464520309 100644
--- a/src/cpu/simple/base.cc
+++ b/src/cpu/simple/base.cc
@@ -42,20 +42,20 @@
#include "arch/faults.hh"
#include "arch/utility.hh"
+#include "base/loader/symtab.hh"
#include "base/cp_annotate.hh"
#include "base/cprintf.hh"
#include "base/inifile.hh"
-#include "base/loader/symtab.hh"
#include "base/misc.hh"
#include "base/pollevent.hh"
#include "base/range.hh"
#include "base/trace.hh"
#include "base/types.hh"
#include "config/the_isa.hh"
+#include "cpu/simple/base.hh"
#include "cpu/base.hh"
#include "cpu/exetrace.hh"
#include "cpu/profile.hh"
-#include "cpu/simple/base.hh"
#include "cpu/simple_thread.hh"
#include "cpu/smt.hh"
#include "cpu/static_inst.hh"
diff --git a/src/cpu/simple/base.hh b/src/cpu/simple/base.hh
index 628432d76..2696cc395 100644
--- a/src/cpu/simple/base.hh
+++ b/src/cpu/simple/base.hh
@@ -38,8 +38,8 @@
#include "config/full_system.hh"
#include "config/the_isa.hh"
#include "cpu/base.hh"
-#include "cpu/simple_thread.hh"
#include "cpu/pc_event.hh"
+#include "cpu/simple_thread.hh"
#include "cpu/static_inst.hh"
#include "mem/packet.hh"
#include "mem/port.hh"
diff --git a/src/cpu/simple/timing.cc b/src/cpu/simple/timing.cc
index aca48e5d4..52d4b06d2 100644
--- a/src/cpu/simple/timing.cc
+++ b/src/cpu/simple/timing.cc
@@ -45,8 +45,8 @@
#include "arch/utility.hh"
#include "base/bigint.hh"
#include "config/the_isa.hh"
-#include "cpu/exetrace.hh"
#include "cpu/simple/timing.hh"
+#include "cpu/exetrace.hh"
#include "mem/packet.hh"
#include "mem/packet_access.hh"
#include "params/TimingSimpleCPU.hh"
diff --git a/src/cpu/simple/timing.hh b/src/cpu/simple/timing.hh
index a7a3eb7c3..778506703 100644
--- a/src/cpu/simple/timing.hh
+++ b/src/cpu/simple/timing.hh
@@ -33,7 +33,6 @@
#include "cpu/simple/base.hh"
#include "cpu/translation.hh"
-
#include "params/TimingSimpleCPU.hh"
class TimingSimpleCPU : public BaseSimpleCPU
diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh
index 48077a9b9..5420519e4 100644
--- a/src/cpu/simple_thread.hh
+++ b/src/cpu/simple_thread.hh
@@ -66,8 +66,8 @@ namespace TheISA {
#else // !FULL_SYSTEM
-#include "sim/process.hh"
#include "mem/page_table.hh"
+#include "sim/process.hh"
class TranslatingPort;
#endif // FULL_SYSTEM
diff --git a/src/cpu/static_inst.cc b/src/cpu/static_inst.cc
index f1ec05802..df59d1fc3 100644
--- a/src/cpu/static_inst.cc
+++ b/src/cpu/static_inst.cc
@@ -30,6 +30,7 @@
*/
#include <iostream>
+
#include "cpu/static_inst.hh"
#include "sim/core.hh"
diff --git a/src/cpu/static_inst.hh b/src/cpu/static_inst.hh
index 20483c499..c41ac38a6 100644
--- a/src/cpu/static_inst.hh
+++ b/src/cpu/static_inst.hh
@@ -35,13 +35,13 @@
#include <string>
#include "arch/isa_traits.hh"
-#include "arch/types.hh"
#include "arch/registers.hh"
-#include "config/the_isa.hh"
+#include "arch/types.hh"
#include "base/hashmap.hh"
#include "base/misc.hh"
#include "base/refcnt.hh"
#include "base/types.hh"
+#include "config/the_isa.hh"
#include "cpu/op_class.hh"
#include "sim/fault_fwd.hh"
diff --git a/src/cpu/testers/directedtest/InvalidateGenerator.cc b/src/cpu/testers/directedtest/InvalidateGenerator.cc
index 724702d61..3b5aa55e5 100644
--- a/src/cpu/testers/directedtest/InvalidateGenerator.cc
+++ b/src/cpu/testers/directedtest/InvalidateGenerator.cc
@@ -27,9 +27,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "cpu/testers/directedtest/RubyDirectedTester.hh"
#include "cpu/testers/directedtest/DirectedGenerator.hh"
#include "cpu/testers/directedtest/InvalidateGenerator.hh"
+#include "cpu/testers/directedtest/RubyDirectedTester.hh"
InvalidateGenerator::InvalidateGenerator(const Params *p)
: DirectedGenerator(p)
diff --git a/src/cpu/testers/directedtest/InvalidateGenerator.hh b/src/cpu/testers/directedtest/InvalidateGenerator.hh
index ab68c859f..14c47b70b 100644
--- a/src/cpu/testers/directedtest/InvalidateGenerator.hh
+++ b/src/cpu/testers/directedtest/InvalidateGenerator.hh
@@ -35,8 +35,8 @@
#ifndef __CPU_DIRECTEDTEST_INVALIDATEGENERATOR_HH__
#define __CPU_DIRECTEDTEST_INVALIDATEGENERATOR_HH__
-#include "cpu/testers/directedtest/RubyDirectedTester.hh"
#include "cpu/testers/directedtest/DirectedGenerator.hh"
+#include "cpu/testers/directedtest/RubyDirectedTester.hh"
#include "mem/protocol/InvalidateGeneratorStatus.hh"
#include "params/InvalidateGenerator.hh"
diff --git a/src/cpu/testers/directedtest/RubyDirectedTester.hh b/src/cpu/testers/directedtest/RubyDirectedTester.hh
index bd3989c04..163c206d8 100644
--- a/src/cpu/testers/directedtest/RubyDirectedTester.hh
+++ b/src/cpu/testers/directedtest/RubyDirectedTester.hh
@@ -31,15 +31,15 @@
#define __CPU_DIRECTEDTEST_RUBYDIRECTEDTESTER_HH__
#include <iostream>
-#include <vector>
#include <string>
+#include <vector>
-#include "mem/mem_object.hh"
-#include "mem/packet.hh"
#include "mem/ruby/common/DataBlock.hh"
#include "mem/ruby/common/Global.hh"
#include "mem/ruby/common/SubBlock.hh"
#include "mem/ruby/system/RubyPort.hh"
+#include "mem/mem_object.hh"
+#include "mem/packet.hh"
#include "params/RubyDirectedTester.hh"
class DirectedGenerator;
diff --git a/src/cpu/testers/memtest/memtest.cc b/src/cpu/testers/memtest/memtest.cc
index 9440bfec2..758a25ea2 100644
--- a/src/cpu/testers/memtest/memtest.cc
+++ b/src/cpu/testers/memtest/memtest.cc
@@ -40,8 +40,8 @@
#include "base/statistics.hh"
#include "cpu/testers/memtest/memtest.hh"
#include "mem/mem_object.hh"
-#include "mem/port.hh"
#include "mem/packet.hh"
+#include "mem/port.hh"
#include "mem/request.hh"
#include "sim/sim_events.hh"
#include "sim/stats.hh"
diff --git a/src/cpu/testers/memtest/memtest.hh b/src/cpu/testers/memtest/memtest.hh
index bb71da355..4e489de5c 100644
--- a/src/cpu/testers/memtest/memtest.hh
+++ b/src/cpu/testers/memtest/memtest.hh
@@ -34,15 +34,15 @@
#include <set>
-#include "base/statistics.hh"
#include "base/fast_alloc.hh"
+#include "base/statistics.hh"
+#include "mem/mem_object.hh"
+#include "mem/port.hh"
#include "params/MemTest.hh"
#include "sim/eventq.hh"
#include "sim/sim_exit.hh"
#include "sim/sim_object.hh"
#include "sim/stats.hh"
-#include "mem/mem_object.hh"
-#include "mem/port.hh"
class Packet;
class MemTest : public MemObject
diff --git a/src/cpu/testers/networktest/networktest.cc b/src/cpu/testers/networktest/networktest.cc
index 73d9364b7..1c1555743 100644
--- a/src/cpu/testers/networktest/networktest.cc
+++ b/src/cpu/testers/networktest/networktest.cc
@@ -28,18 +28,18 @@
* Authors: Tushar Krishna
*/
+#include <cmath>
#include <iomanip>
#include <set>
#include <string>
#include <vector>
-#include <cmath>
#include "base/misc.hh"
#include "base/statistics.hh"
#include "cpu/testers/networktest/networktest.hh"
#include "mem/mem_object.hh"
-#include "mem/port.hh"
#include "mem/packet.hh"
+#include "mem/port.hh"
#include "mem/request.hh"
#include "sim/sim_events.hh"
#include "sim/stats.hh"
diff --git a/src/cpu/testers/networktest/networktest.hh b/src/cpu/testers/networktest/networktest.hh
index 923f47df2..96daa5af2 100644
--- a/src/cpu/testers/networktest/networktest.hh
+++ b/src/cpu/testers/networktest/networktest.hh
@@ -33,15 +33,15 @@
#include <set>
-#include "base/statistics.hh"
#include "base/fast_alloc.hh"
+#include "base/statistics.hh"
+#include "mem/mem_object.hh"
+#include "mem/port.hh"
#include "params/NetworkTest.hh"
#include "sim/eventq.hh"
#include "sim/sim_exit.hh"
#include "sim/sim_object.hh"
#include "sim/stats.hh"
-#include "mem/mem_object.hh"
-#include "mem/port.hh"
class Packet;
class NetworkTest : public MemObject
diff --git a/src/cpu/testers/rubytest/CheckTable.cc b/src/cpu/testers/rubytest/CheckTable.cc
index af7467148..c2aa68a53 100644
--- a/src/cpu/testers/rubytest/CheckTable.cc
+++ b/src/cpu/testers/rubytest/CheckTable.cc
@@ -30,7 +30,6 @@
#include "base/intmath.hh"
#include "cpu/testers/rubytest/Check.hh"
#include "cpu/testers/rubytest/CheckTable.hh"
-#include "cpu/testers/rubytest/CheckTable.hh"
CheckTable::CheckTable(int _num_cpu_sequencers, RubyTester* _tester)
: m_num_cpu_sequencers(_num_cpu_sequencers), m_tester_ptr(_tester)
diff --git a/src/cpu/testers/rubytest/RubyTester.hh b/src/cpu/testers/rubytest/RubyTester.hh
index 4ea5bda73..1c0147c7e 100644
--- a/src/cpu/testers/rubytest/RubyTester.hh
+++ b/src/cpu/testers/rubytest/RubyTester.hh
@@ -31,15 +31,15 @@
#define __CPU_RUBYTEST_RUBYTESTER_HH__
#include <iostream>
-#include <vector>
#include <string>
+#include <vector>
#include "cpu/testers/rubytest/CheckTable.hh"
-#include "mem/mem_object.hh"
-#include "mem/packet.hh"
#include "mem/ruby/common/Global.hh"
#include "mem/ruby/common/SubBlock.hh"
#include "mem/ruby/system/RubyPort.hh"
+#include "mem/mem_object.hh"
+#include "mem/packet.hh"
#include "params/RubyTester.hh"
class RubyTester : public MemObject
diff --git a/src/cpu/thread_context.hh b/src/cpu/thread_context.hh
index 1c70ef59a..0f7228f0c 100644
--- a/src/cpu/thread_context.hh
+++ b/src/cpu/thread_context.hh
@@ -31,8 +31,8 @@
#ifndef __CPU_THREAD_CONTEXT_HH__
#define __CPU_THREAD_CONTEXT_HH__
-#include <string>
#include <iostream>
+#include <string>
#include "arch/registers.hh"
#include "arch/types.hh"
diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh
index e0edc466e..824579852 100644
--- a/src/cpu/thread_state.hh
+++ b/src/cpu/thread_state.hh
@@ -33,9 +33,9 @@
#include "arch/types.hh"
#include "config/the_isa.hh"
+#include "cpu/base.hh"
#include "cpu/profile.hh"
#include "cpu/thread_context.hh"
-#include "cpu/base.hh"
#if !FULL_SYSTEM
#include "mem/mem_object.hh"
diff --git a/src/cpu/trace/opt_cpu.cc b/src/cpu/trace/opt_cpu.cc
index 10e71db7b..b3a6d761b 100644
--- a/src/cpu/trace/opt_cpu.cc
+++ b/src/cpu/trace/opt_cpu.cc
@@ -36,8 +36,8 @@
#include <algorithm> // For heap functions.
-#include "cpu/trace/opt_cpu.hh"
#include "cpu/trace/reader/mem_trace_reader.hh"
+#include "cpu/trace/opt_cpu.hh"
#include "params/OptCPU.hh"
#include "sim/sim_events.hh"
diff --git a/src/cpu/trace/reader/ibm_reader.hh b/src/cpu/trace/reader/ibm_reader.hh
index a72f62e03..048c5dbda 100644
--- a/src/cpu/trace/reader/ibm_reader.hh
+++ b/src/cpu/trace/reader/ibm_reader.hh
@@ -36,7 +36,8 @@
#ifndef __IBM_READER_HH__
#define __IBM_READER_HH__
-#include <stdio.h>
+#include <cstdio>
+
#include "cpu/trace/reader/mem_trace_reader.hh"
#include "mem/mem_req.hh"
diff --git a/src/cpu/trace/reader/itx_reader.hh b/src/cpu/trace/reader/itx_reader.hh
index 63a4c9ac9..8dd1c9a62 100644
--- a/src/cpu/trace/reader/itx_reader.hh
+++ b/src/cpu/trace/reader/itx_reader.hh
@@ -36,13 +36,12 @@
#ifndef __ITX_READER_HH__
#define __ITX_READER_HH__
-#include <stdio.h>
+#include <cstdio>
#include <string>
#include "cpu/trace/reader/mem_trace_reader.hh"
#include "mem/mem_req.hh"
-
/**
* A memory trace reader for the Intel ITX memory trace format.
*/
diff --git a/src/cpu/trace/reader/mem_trace_reader.hh b/src/cpu/trace/reader/mem_trace_reader.hh
index 628a3ecdc..ed69efd5b 100644
--- a/src/cpu/trace/reader/mem_trace_reader.hh
+++ b/src/cpu/trace/reader/mem_trace_reader.hh
@@ -35,8 +35,8 @@
#ifndef __MEM_TRACE_READER_HH__
#define __MEM_TRACE_READER_HH__
-#include "sim/sim_object.hh"
#include "mem/mem_req.hh" // For MemReqPtr
+#include "sim/sim_object.hh"
/**
* Pure virtual base class for memory trace readers.
diff --git a/src/cpu/trace/trace_cpu.cc b/src/cpu/trace/trace_cpu.cc
index 70aa1f042..85f269121 100644
--- a/src/cpu/trace/trace_cpu.cc
+++ b/src/cpu/trace/trace_cpu.cc
@@ -36,8 +36,8 @@
#include <algorithm> // For min
-#include "cpu/trace/trace_cpu.hh"
#include "cpu/trace/reader/mem_trace_reader.hh"
+#include "cpu/trace/trace_cpu.hh"
#include "mem/base_mem.hh" // For PARAM constructor
#include "mem/mem_interface.hh"
#include "params/TraceCPU.hh"
diff --git a/src/dev/alpha/tsunami.cc b/src/dev/alpha/tsunami.cc
index b36b5977d..34aab6ed0 100644
--- a/src/dev/alpha/tsunami.cc
+++ b/src/dev/alpha/tsunami.cc
@@ -38,10 +38,10 @@
#include "config/the_isa.hh"
#include "cpu/intr_control.hh"
+#include "dev/alpha/tsunami.hh"
#include "dev/alpha/tsunami_cchip.hh"
-#include "dev/alpha/tsunami_pchip.hh"
#include "dev/alpha/tsunami_io.hh"
-#include "dev/alpha/tsunami.hh"
+#include "dev/alpha/tsunami_pchip.hh"
#include "dev/terminal.hh"
#include "sim/system.hh"
diff --git a/src/dev/alpha/tsunami_io.cc b/src/dev/alpha/tsunami_io.cc
index c90f06b5a..37456ada2 100644
--- a/src/dev/alpha/tsunami_io.cc
+++ b/src/dev/alpha/tsunami_io.cc
@@ -43,11 +43,11 @@
#include "base/time.hh"
#include "base/trace.hh"
#include "config/the_isa.hh"
-#include "dev/rtcreg.h"
-#include "dev/alpha/tsunami_cchip.hh"
#include "dev/alpha/tsunami.hh"
+#include "dev/alpha/tsunami_cchip.hh"
#include "dev/alpha/tsunami_io.hh"
#include "dev/alpha/tsunamireg.h"
+#include "dev/rtcreg.h"
#include "mem/packet.hh"
#include "mem/packet_access.hh"
#include "mem/port.hh"
diff --git a/src/dev/alpha/tsunami_io.hh b/src/dev/alpha/tsunami_io.hh
index b6d63322b..f88cf5a6c 100644
--- a/src/dev/alpha/tsunami_io.hh
+++ b/src/dev/alpha/tsunami_io.hh
@@ -40,8 +40,8 @@
#include "base/range.hh"
#include "dev/alpha/tsunami.hh"
#include "dev/intel_8254_timer.hh"
-#include "dev/mc146818.hh"
#include "dev/io_device.hh"
+#include "dev/mc146818.hh"
#include "params/TsunamiIO.hh"
#include "sim/eventq.hh"
diff --git a/src/dev/alpha/tsunami_pchip.cc b/src/dev/alpha/tsunami_pchip.cc
index df980cf79..e293f6333 100644
--- a/src/dev/alpha/tsunami_pchip.cc
+++ b/src/dev/alpha/tsunami_pchip.cc
@@ -39,9 +39,9 @@
#include "base/trace.hh"
#include "config/the_isa.hh"
+#include "dev/alpha/tsunami.hh"
#include "dev/alpha/tsunami_pchip.hh"
#include "dev/alpha/tsunamireg.h"
-#include "dev/alpha/tsunami.hh"
#include "mem/packet.hh"
#include "mem/packet_access.hh"
#include "sim/system.hh"
diff --git a/src/dev/arm/amba_device.cc b/src/dev/arm/amba_device.cc
index 37eb77ae1..b2948b803 100644
--- a/src/dev/arm/amba_device.cc
+++ b/src/dev/arm/amba_device.cc
@@ -41,8 +41,8 @@
*/
#include "base/trace.hh"
-#include "dev/arm/amba_fake.hh"
#include "dev/arm/amba_device.hh"
+#include "dev/arm/amba_fake.hh"
#include "mem/packet.hh"
#include "mem/packet_access.hh"
diff --git a/src/dev/arm/amba_device.hh b/src/dev/arm/amba_device.hh
index 297a78f82..f3db8b0ab 100644
--- a/src/dev/arm/amba_device.hh
+++ b/src/dev/arm/amba_device.hh
@@ -50,13 +50,13 @@
#define __DEV_ARM_AMBA_DEVICE_HH__
#include "base/range.hh"
-#include "dev/io_device.hh"
#include "dev/arm/gic.hh"
+#include "dev/io_device.hh"
#include "mem/packet.hh"
#include "mem/packet_access.hh"
#include "params/AmbaDevice.hh"
-#include "params/AmbaIntDevice.hh"
#include "params/AmbaDmaDevice.hh"
+#include "params/AmbaIntDevice.hh"
namespace AmbaDev {
diff --git a/src/dev/arm/kmi.cc b/src/dev/arm/kmi.cc
index adf1439b3..1b8c15b83 100644
--- a/src/dev/arm/kmi.cc
+++ b/src/dev/arm/kmi.cc
@@ -41,8 +41,8 @@
* William Wang
*/
-#include "base/trace.hh"
#include "base/vnc/vncserver.hh"
+#include "base/trace.hh"
#include "dev/arm/amba_device.hh"
#include "dev/arm/kmi.hh"
#include "dev/ps2.hh"
diff --git a/src/dev/arm/kmi.hh b/src/dev/arm/kmi.hh
index 1e25f8974..dc488ccce 100644
--- a/src/dev/arm/kmi.hh
+++ b/src/dev/arm/kmi.hh
@@ -50,8 +50,8 @@
#include <list>
-#include "base/range.hh"
#include "base/vnc/vncserver.hh"
+#include "base/range.hh"
#include "dev/arm/amba_device.hh"
#include "params/Pl050.hh"
diff --git a/src/dev/arm/pl111.cc b/src/dev/arm/pl111.cc
index e5da82e73..410c8d361 100644
--- a/src/dev/arm/pl111.cc
+++ b/src/dev/arm/pl111.cc
@@ -38,10 +38,10 @@
* Ali Saidi
*/
+#include "base/vnc/vncserver.hh"
#include "base/bitmap.hh"
#include "base/output.hh"
#include "base/trace.hh"
-#include "base/vnc/vncserver.hh"
#include "dev/arm/amba_device.hh"
#include "dev/arm/gic.hh"
#include "dev/arm/pl111.hh"
diff --git a/src/dev/disk_image.cc b/src/dev/disk_image.cc
index aa8c98732..6a06e74f6 100644
--- a/src/dev/disk_image.cc
+++ b/src/dev/disk_image.cc
@@ -34,9 +34,9 @@
#include <sys/types.h>
#include <sys/uio.h>
-#include <errno.h>
#include <unistd.h>
+#include <cerrno>
#include <cstring>
#include <fstream>
#include <string>
@@ -45,8 +45,8 @@
#include "base/misc.hh"
#include "base/trace.hh"
#include "dev/disk_image.hh"
-#include "sim/sim_exit.hh"
#include "sim/byteswap.hh"
+#include "sim/sim_exit.hh"
using namespace std;
diff --git a/src/dev/disk_image.hh b/src/dev/disk_image.hh
index a5c70ec82..3865562a0 100644
--- a/src/dev/disk_image.hh
+++ b/src/dev/disk_image.hh
@@ -38,10 +38,10 @@
#include <fstream>
#include "base/hashmap.hh"
-#include "sim/sim_object.hh"
-#include "params/DiskImage.hh"
#include "params/CowDiskImage.hh"
+#include "params/DiskImage.hh"
#include "params/RawDiskImage.hh"
+#include "sim/sim_object.hh"
#define SectorSize (512)
diff --git a/src/dev/etherbus.hh b/src/dev/etherbus.hh
index 6408f7f1f..43978b9c2 100644
--- a/src/dev/etherbus.hh
+++ b/src/dev/etherbus.hh
@@ -35,12 +35,11 @@
#ifndef __ETHERBUS_H__
#define __ETHERBUS_H__
-#include "sim/eventq.hh"
-#include "dev/etherpkt.hh"
#include "dev/etherobject.hh"
+#include "dev/etherpkt.hh"
#include "params/EtherBus.hh"
+#include "sim/eventq.hh"
#include "sim/sim_object.hh"
-#include "params/EtherBus.hh"
class EtherDump;
class EtherInt;
diff --git a/src/dev/etherdump.hh b/src/dev/etherdump.hh
index cf4213b27..cc8fa9151 100644
--- a/src/dev/etherdump.hh
+++ b/src/dev/etherdump.hh
@@ -36,9 +36,10 @@
#define __ETHERDUMP_H__
#include <fstream>
+
#include "dev/etherpkt.hh"
-#include "sim/sim_object.hh"
#include "params/EtherDump.hh"
+#include "sim/sim_object.hh"
/*
* Simple object for creating a simple pcap style packet trace
diff --git a/src/dev/etherint.cc b/src/dev/etherint.cc
index e9f830702..fce7b28c6 100644
--- a/src/dev/etherint.cc
+++ b/src/dev/etherint.cc
@@ -28,8 +28,8 @@
* Authors: Nathan Binkert
*/
-#include "dev/etherint.hh"
#include "base/misc.hh"
+#include "dev/etherint.hh"
#include "sim/sim_object.hh"
void
diff --git a/src/dev/etherlink.cc b/src/dev/etherlink.cc
index 9d8d8cfa8..dcecfd933 100644
--- a/src/dev/etherlink.cc
+++ b/src/dev/etherlink.cc
@@ -45,9 +45,9 @@
#include "dev/etherlink.hh"
#include "dev/etherpkt.hh"
#include "params/EtherLink.hh"
+#include "sim/core.hh"
#include "sim/serialize.hh"
#include "sim/system.hh"
-#include "sim/core.hh"
using namespace std;
diff --git a/src/dev/etherlink.hh b/src/dev/etherlink.hh
index c47948f58..ca17b837d 100644
--- a/src/dev/etherlink.hh
+++ b/src/dev/etherlink.hh
@@ -40,7 +40,6 @@
#include "dev/etherobject.hh"
#include "dev/etherpkt.hh"
#include "params/EtherLink.hh"
-#include "params/EtherLink.hh"
#include "sim/eventq.hh"
#include "sim/sim_object.hh"
diff --git a/src/dev/ethertap.cc b/src/dev/ethertap.cc
index 76952e5c0..401ea8a83 100644
--- a/src/dev/ethertap.cc
+++ b/src/dev/ethertap.cc
@@ -36,7 +36,6 @@
#include <sys/param.h>
#endif
#include <netinet/in.h>
-
#include <unistd.h>
#include <deque>
diff --git a/src/dev/ethertap.hh b/src/dev/ethertap.hh
index 94957b2ce..2f38d57b4 100644
--- a/src/dev/ethertap.hh
+++ b/src/dev/ethertap.hh
@@ -39,8 +39,8 @@
#include <string>
#include "base/pollevent.hh"
-#include "dev/etherobject.hh"
#include "dev/etherint.hh"
+#include "dev/etherobject.hh"
#include "dev/etherpkt.hh"
#include "params/EtherTap.hh"
#include "sim/eventq.hh"
diff --git a/src/dev/ide_ctrl.hh b/src/dev/ide_ctrl.hh
index 430b3fc1b..93291ad66 100644
--- a/src/dev/ide_ctrl.hh
+++ b/src/dev/ide_ctrl.hh
@@ -38,9 +38,9 @@
#define __IDE_CTRL_HH__
#include "base/bitunion.hh"
+#include "dev/io_device.hh"
#include "dev/pcidev.hh"
#include "dev/pcireg.h"
-#include "dev/io_device.hh"
#include "params/IdeController.hh"
class IdeDisk;
diff --git a/src/dev/ide_disk.cc b/src/dev/ide_disk.cc
index a30811d4e..c6c020e5c 100644
--- a/src/dev/ide_disk.cc
+++ b/src/dev/ide_disk.cc
@@ -39,10 +39,10 @@
#include <string>
#include "arch/isa_traits.hh"
-#include "config/the_isa.hh"
#include "base/chunk_generator.hh"
#include "base/cprintf.hh" // csprintf
#include "base/trace.hh"
+#include "config/the_isa.hh"
#include "dev/disk_image.hh"
#include "dev/ide_ctrl.hh"
#include "dev/ide_disk.hh"
diff --git a/src/dev/ide_disk.hh b/src/dev/ide_disk.hh
index 78a9e1fe7..0595e18cf 100644
--- a/src/dev/ide_disk.hh
+++ b/src/dev/ide_disk.hh
@@ -41,9 +41,8 @@
#include "dev/ide_ctrl.hh"
#include "dev/ide_wdcreg.h"
#include "dev/io_device.hh"
-#include "sim/eventq.hh"
#include "params/IdeDisk.hh"
-
+#include "sim/eventq.hh"
class ChunkGenerator;
diff --git a/src/dev/intel_8254_timer.hh b/src/dev/intel_8254_timer.hh
index 30ddc7bca..bdfdf36cc 100644
--- a/src/dev/intel_8254_timer.hh
+++ b/src/dev/intel_8254_timer.hh
@@ -33,8 +33,8 @@
#ifndef __DEV_8254_HH__
#define __DEV_8254_HH__
-#include <string>
#include <iostream>
+#include <string>
#include "base/bitunion.hh"
#include "base/types.hh"
diff --git a/src/dev/io_device.cc b/src/dev/io_device.cc
index ffe8fdf06..b9c47adc6 100644
--- a/src/dev/io_device.cc
+++ b/src/dev/io_device.cc
@@ -34,7 +34,6 @@
#include "dev/io_device.hh"
#include "sim/system.hh"
-
PioPort::PioPort(PioDevice *dev, System *s, std::string pname)
: SimpleTimingPort(dev->name() + pname, dev), device(dev)
{ }
diff --git a/src/dev/isa_fake.hh b/src/dev/isa_fake.hh
index 1fd2415cb..07657ad7d 100644
--- a/src/dev/isa_fake.hh
+++ b/src/dev/isa_fake.hh
@@ -40,8 +40,8 @@
#include "base/range.hh"
#include "dev/io_device.hh"
// #include "dev/alpha/tsunami.hh"
-#include "params/IsaFake.hh"
#include "mem/packet.hh"
+#include "params/IsaFake.hh"
/**
* IsaFake is a device that returns, BadAddr, 1 or 0 on all reads and
diff --git a/src/dev/mc146818.cc b/src/dev/mc146818.cc
index 987b1bcd3..c29bb94b4 100644
--- a/src/dev/mc146818.cc
+++ b/src/dev/mc146818.cc
@@ -31,8 +31,8 @@
*/
#include <sys/time.h>
-#include <time.h>
+#include <ctime>
#include <string>
#include "base/bitfield.hh"
diff --git a/src/dev/mips/malta.cc b/src/dev/mips/malta.cc
index 73dc9f116..bcf970745 100755
--- a/src/dev/mips/malta.cc
+++ b/src/dev/mips/malta.cc
@@ -39,10 +39,10 @@
#include "config/the_isa.hh"
#include "cpu/intr_control.hh"
+#include "dev/mips/malta.hh"
#include "dev/mips/malta_cchip.hh"
-#include "dev/mips/malta_pchip.hh"
#include "dev/mips/malta_io.hh"
-#include "dev/mips/malta.hh"
+#include "dev/mips/malta_pchip.hh"
#include "dev/terminal.hh"
#include "params/Malta.hh"
#include "sim/system.hh"
diff --git a/src/dev/mips/malta_cchip.hh b/src/dev/mips/malta_cchip.hh
index 667b06b3f..4841551c4 100755
--- a/src/dev/mips/malta_cchip.hh
+++ b/src/dev/mips/malta_cchip.hh
@@ -36,8 +36,8 @@
#ifndef __MALTA_CCHIP_HH__
#define __MALTA_CCHIP_HH__
-#include "dev/mips/malta.hh"
#include "base/range.hh"
+#include "dev/mips/malta.hh"
#include "dev/io_device.hh"
#include "params/MaltaCChip.hh"
diff --git a/src/dev/mips/malta_io.cc b/src/dev/mips/malta_io.cc
index a7c68a3bc..bd9288487 100755
--- a/src/dev/mips/malta_io.cc
+++ b/src/dev/mips/malta_io.cc
@@ -43,11 +43,11 @@
#include "base/time.hh"
#include "base/trace.hh"
#include "config/the_isa.hh"
-#include "dev/rtcreg.h"
-#include "dev/mips/malta_cchip.hh"
#include "dev/mips/malta.hh"
+#include "dev/mips/malta_cchip.hh"
#include "dev/mips/malta_io.hh"
#include "dev/mips/maltareg.h"
+#include "dev/rtcreg.h"
#include "mem/packet.hh"
#include "mem/packet_access.hh"
#include "mem/port.hh"
diff --git a/src/dev/mips/malta_pchip.cc b/src/dev/mips/malta_pchip.cc
index 035433021..7832a31bd 100755
--- a/src/dev/mips/malta_pchip.cc
+++ b/src/dev/mips/malta_pchip.cc
@@ -39,9 +39,9 @@
#include "base/trace.hh"
#include "config/the_isa.hh"
+#include "dev/mips/malta.hh"
#include "dev/mips/malta_pchip.hh"
#include "dev/mips/maltareg.h"
-#include "dev/mips/malta.hh"
#include "mem/packet.hh"
#include "mem/packet_access.hh"
#include "sim/system.hh"
diff --git a/src/dev/mips/malta_pchip.hh b/src/dev/mips/malta_pchip.hh
index 62cdc886e..a554e253e 100755
--- a/src/dev/mips/malta_pchip.hh
+++ b/src/dev/mips/malta_pchip.hh
@@ -35,8 +35,8 @@
#ifndef __MALTA_PCHIP_HH__
#define __MALTA_PCHIP_HH__
-#include "dev/mips/malta.hh"
#include "base/range.hh"
+#include "dev/mips/malta.hh"
#include "dev/io_device.hh"
#include "params/MaltaPChip.hh"
diff --git a/src/dev/pciconfigall.hh b/src/dev/pciconfigall.hh
index fbd022340..b3f6d1472 100644
--- a/src/dev/pciconfigall.hh
+++ b/src/dev/pciconfigall.hh
@@ -37,12 +37,11 @@
#ifndef __PCICONFIGALL_HH__
#define __PCICONFIGALL_HH__
-#include "dev/pcireg.h"
#include "base/range.hh"
#include "dev/io_device.hh"
+#include "dev/pcireg.h"
#include "params/PciConfigAll.hh"
-
/**
* PCI Config Space
* All of PCI config space needs to return -1 on Tsunami, except
diff --git a/src/dev/platform.hh b/src/dev/platform.hh
index 00d90a286..a3f239865 100644
--- a/src/dev/platform.hh
+++ b/src/dev/platform.hh
@@ -40,8 +40,8 @@
#include <bitset>
#include <set>
-#include "sim/sim_object.hh"
#include "params/Platform.hh"
+#include "sim/sim_object.hh"
class PciConfigAll;
class IntrControl;
diff --git a/src/dev/ps2.cc b/src/dev/ps2.cc
index fe90ce6bc..dbcdfcaec 100644
--- a/src/dev/ps2.cc
+++ b/src/dev/ps2.cc
@@ -38,11 +38,10 @@
*/
#include <list>
-#include "x11keysym/keysym.h"
#include "base/misc.hh"
#include "dev/ps2.hh"
-
+#include "x11keysym/keysym.h"
namespace Ps2 {
diff --git a/src/dev/simple_disk.hh b/src/dev/simple_disk.hh
index 83ba622e6..1a95bd59f 100644
--- a/src/dev/simple_disk.hh
+++ b/src/dev/simple_disk.hh
@@ -35,8 +35,8 @@
#ifndef __DEV_SIMPLE_DISK_HH__
#define __DEV_SIMPLE_DISK_HH__
-#include "sim/sim_object.hh"
#include "params/SimpleDisk.hh"
+#include "sim/sim_object.hh"
class DiskImage;
class System;
diff --git a/src/dev/sparc/iob.cc b/src/dev/sparc/iob.cc
index 0b03aceb6..9bf8eca15 100644
--- a/src/dev/sparc/iob.cc
+++ b/src/dev/sparc/iob.cc
@@ -37,15 +37,15 @@
#include <cstring>
-#include "arch/sparc/isa_traits.hh"
#include "arch/sparc/faults.hh"
+#include "arch/sparc/isa_traits.hh"
#include "base/bitfield.hh"
#include "base/trace.hh"
#include "cpu/intr_control.hh"
#include "dev/sparc/iob.hh"
#include "dev/platform.hh"
-#include "mem/port.hh"
#include "mem/packet_access.hh"
+#include "mem/port.hh"
#include "sim/faults.hh"
#include "sim/system.hh"
diff --git a/src/dev/sparc/iob.hh b/src/dev/sparc/iob.hh
index b2fd6cbf6..7391b1ccd 100644
--- a/src/dev/sparc/iob.hh
+++ b/src/dev/sparc/iob.hh
@@ -37,8 +37,8 @@
#define __DEV_SPARC_IOB_HH__
#include "base/range.hh"
-#include "dev/io_device.hh"
#include "dev/disk_image.hh"
+#include "dev/io_device.hh"
#include "params/Iob.hh"
class IntrControl;
diff --git a/src/dev/sparc/mm_disk.cc b/src/dev/sparc/mm_disk.cc
index f0d51eef4..f9a91eded 100644
--- a/src/dev/sparc/mm_disk.cc
+++ b/src/dev/sparc/mm_disk.cc
@@ -38,8 +38,8 @@
#include "base/trace.hh"
#include "dev/sparc/mm_disk.hh"
#include "dev/platform.hh"
-#include "mem/port.hh"
#include "mem/packet_access.hh"
+#include "mem/port.hh"
#include "sim/byteswap.hh"
#include "sim/system.hh"
diff --git a/src/dev/sparc/mm_disk.hh b/src/dev/sparc/mm_disk.hh
index 41ec0cc59..0e43449a1 100644
--- a/src/dev/sparc/mm_disk.hh
+++ b/src/dev/sparc/mm_disk.hh
@@ -37,8 +37,8 @@
#define __DEV_SPARC_MM_DISK_HH__
#include "base/range.hh"
-#include "dev/io_device.hh"
#include "dev/disk_image.hh"
+#include "dev/io_device.hh"
#include "params/MmDisk.hh"
class MmDisk : public BasicPioDevice
diff --git a/src/dev/terminal.cc b/src/dev/terminal.cc
index fba0c6130..637061082 100644
--- a/src/dev/terminal.cc
+++ b/src/dev/terminal.cc
@@ -35,13 +35,13 @@
#include <sys/ioctl.h>
#include <sys/termios.h>
-#include <errno.h>
#include <poll.h>
#include <unistd.h>
#include <cctype>
-#include <iostream>
+#include <cerrno>
#include <fstream>
+#include <iostream>
#include <sstream>
#include <string>
diff --git a/src/dev/terminal.hh b/src/dev/terminal.hh
index d2499b6b2..e2322d7c2 100644
--- a/src/dev/terminal.hh
+++ b/src/dev/terminal.hh
@@ -39,11 +39,11 @@
#include <iostream>
#include "base/circlebuf.hh"
-#include "cpu/intr_control.hh"
#include "base/pollevent.hh"
#include "base/socket.hh"
-#include "sim/sim_object.hh"
+#include "cpu/intr_control.hh"
#include "params/Terminal.hh"
+#include "sim/sim_object.hh"
class TerminalListener;
class Uart;
diff --git a/src/dev/x86/i8042.hh b/src/dev/x86/i8042.hh
index b14d254ca..be12c4e96 100644
--- a/src/dev/x86/i8042.hh
+++ b/src/dev/x86/i8042.hh
@@ -31,12 +31,12 @@
#ifndef __DEV_X86_I8042_HH__
#define __DEV_X86_I8042_HH__
-#include "dev/io_device.hh"
+#include <queue>
+
#include "dev/x86/intdev.hh"
+#include "dev/io_device.hh"
#include "params/I8042.hh"
-#include <queue>
-
namespace X86ISA
{
diff --git a/src/dev/x86/i82094aa.hh b/src/dev/x86/i82094aa.hh
index 8be23d2c9..ae0322d94 100644
--- a/src/dev/x86/i82094aa.hh
+++ b/src/dev/x86/i82094aa.hh
@@ -31,14 +31,14 @@
#ifndef __DEV_X86_I82094AA_HH__
#define __DEV_X86_I82094AA_HH__
+#include <map>
+
#include "base/bitunion.hh"
#include "base/range_map.hh"
-#include "dev/io_device.hh"
#include "dev/x86/intdev.hh"
+#include "dev/io_device.hh"
#include "params/I82094AA.hh"
-#include <map>
-
namespace X86ISA
{
diff --git a/src/dev/x86/i8259.hh b/src/dev/x86/i8259.hh
index 2a5d5f6aa..eee5ec171 100644
--- a/src/dev/x86/i8259.hh
+++ b/src/dev/x86/i8259.hh
@@ -31,10 +31,10 @@
#ifndef __DEV_X86_I8259_HH__
#define __DEV_X86_I8259_HH__
-#include "dev/io_device.hh"
#include "dev/x86/intdev.hh"
-#include "params/I8259.hh"
+#include "dev/io_device.hh"
#include "enums/X86I8259CascadeMode.hh"
+#include "params/I8259.hh"
namespace X86ISA
{
diff --git a/src/dev/x86/intdev.hh b/src/dev/x86/intdev.hh
index b26b081bf..1b3efdbb5 100644
--- a/src/dev/x86/intdev.hh
+++ b/src/dev/x86/intdev.hh
@@ -32,18 +32,17 @@
#define __DEV_X86_INTDEV_HH__
#include <cassert>
+#include <list>
#include <string>
-#include "arch/x86/x86_traits.hh"
#include "arch/x86/intmessage.hh"
+#include "arch/x86/x86_traits.hh"
#include "mem/mem_object.hh"
#include "mem/mport.hh"
-#include "sim/sim_object.hh"
-#include "params/X86IntSourcePin.hh"
-#include "params/X86IntSinkPin.hh"
#include "params/X86IntLine.hh"
-
-#include <list>
+#include "params/X86IntSinkPin.hh"
+#include "params/X86IntSourcePin.hh"
+#include "sim/sim_object.hh"
namespace X86ISA {
diff --git a/src/dev/x86/pc.cc b/src/dev/x86/pc.cc
index e3449abf6..7912a45e1 100644
--- a/src/dev/x86/pc.cc
+++ b/src/dev/x86/pc.cc
@@ -40,12 +40,12 @@
#include "arch/x86/x86_traits.hh"
#include "config/the_isa.hh"
#include "cpu/intr_control.hh"
-#include "dev/terminal.hh"
#include "dev/x86/i82094aa.hh"
#include "dev/x86/i8254.hh"
#include "dev/x86/i8259.hh"
#include "dev/x86/pc.hh"
#include "dev/x86/south_bridge.hh"
+#include "dev/terminal.hh"
#include "sim/system.hh"
using namespace std;
diff --git a/src/dev/x86/south_bridge.hh b/src/dev/x86/south_bridge.hh
index 61d6d387a..b9ef17d28 100644
--- a/src/dev/x86/south_bridge.hh
+++ b/src/dev/x86/south_bridge.hh
@@ -31,8 +31,8 @@
#ifndef __DEV_X86_SOUTH_BRIDGE_HH__
#define __DEV_X86_SOUTH_BRIDGE_HH__
-#include "sim/sim_object.hh"
#include "params/SouthBridge.hh"
+#include "sim/sim_object.hh"
namespace X86ISA
{
diff --git a/src/kern/kernel_stats.cc b/src/kern/kernel_stats.cc
index d1de00fcd..09c1a6760 100644
--- a/src/kern/kernel_stats.cc
+++ b/src/kern/kernel_stats.cc
@@ -33,8 +33,8 @@
#include "base/trace.hh"
#include "cpu/thread_context.hh"
-#include "kern/kernel_stats.hh"
#include "kern/tru64/tru64_syscalls.hh"
+#include "kern/kernel_stats.hh"
#include "sim/system.hh"
using namespace std;
diff --git a/src/kern/kernel_stats.hh b/src/kern/kernel_stats.hh
index 5395b3337..e4ca67fcb 100644
--- a/src/kern/kernel_stats.hh
+++ b/src/kern/kernel_stats.hh
@@ -35,8 +35,8 @@
#include <string>
#include "cpu/static_inst.hh"
-#include "sim/stats.hh"
#include "sim/serialize.hh"
+#include "sim/stats.hh"
class BaseCPU;
class ThreadContext;
diff --git a/src/kern/linux/events.cc b/src/kern/linux/events.cc
index 651dae3d6..2133172e2 100644
--- a/src/kern/linux/events.cc
+++ b/src/kern/linux/events.cc
@@ -43,8 +43,8 @@
#include <sstream>
-#include "base/trace.hh"
#include "arch/utility.hh"
+#include "base/trace.hh"
#include "cpu/thread_context.hh"
#include "kern/linux/events.hh"
#include "kern/linux/printk.hh"
diff --git a/src/kern/linux/printk.cc b/src/kern/linux/printk.cc
index 577245f95..a19d81b08 100644
--- a/src/kern/linux/printk.cc
+++ b/src/kern/linux/printk.cc
@@ -30,11 +30,12 @@
*/
#include <sys/types.h>
+
#include <algorithm>
-#include "sim/arguments.hh"
#include "base/trace.hh"
#include "kern/linux/printk.hh"
+#include "sim/arguments.hh"
using namespace std;
diff --git a/src/kern/operatingsystem.cc b/src/kern/operatingsystem.cc
index 8951b8193..62fcdba7a 100644
--- a/src/kern/operatingsystem.cc
+++ b/src/kern/operatingsystem.cc
@@ -29,8 +29,8 @@
*/
-#include "kern/operatingsystem.hh"
#include "base/misc.hh"
+#include "kern/operatingsystem.hh"
int
OperatingSystem::openSpecialFile(std::string path, LiveProcess *process, ThreadContext *tc)
diff --git a/src/kern/tru64/dump_mbuf.cc b/src/kern/tru64/dump_mbuf.cc
index 207d30792..fda1753d3 100644
--- a/src/kern/tru64/dump_mbuf.cc
+++ b/src/kern/tru64/dump_mbuf.cc
@@ -29,12 +29,13 @@
*/
#include <sys/types.h>
+
#include <algorithm>
#include "arch/isa_traits.hh"
#include "arch/vtophys.hh"
-#include "base/cprintf.hh"
#include "base/loader/symtab.hh"
+#include "base/cprintf.hh"
#include "base/trace.hh"
#include "base/types.hh"
#include "config/the_isa.hh"
diff --git a/src/kern/tru64/printf.cc b/src/kern/tru64/printf.cc
index 921b028a5..600e96818 100644
--- a/src/kern/tru64/printf.cc
+++ b/src/kern/tru64/printf.cc
@@ -29,6 +29,7 @@
*/
#include <sys/types.h>
+
#include <algorithm>
#include "arch/vtophys.hh"
diff --git a/src/kern/tru64/tru64.hh b/src/kern/tru64/tru64.hh
index aa3c4bb50..7e7fedbc3 100644
--- a/src/kern/tru64/tru64.hh
+++ b/src/kern/tru64/tru64.hh
@@ -42,23 +42,24 @@ class Tru64 {};
#else //!FULL_SYSTEM
-#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/types.h>
#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD__)
-#include <sys/param.h>
#include <sys/mount.h>
+#include <sys/param.h>
#else
#include <sys/statfs.h>
#endif
#include <dirent.h>
-#include <errno.h>
#include <fcntl.h>
-#include <string.h> // for memset()
#include <unistd.h>
-#include "config/the_isa.hh"
+#include <cerrno>
+#include <cstring> // for memset()
+
#include "arch/alpha/registers.hh"
+#include "config/the_isa.hh"
#include "cpu/base.hh"
#include "sim/core.hh"
#include "sim/syscall_emul.hh"
diff --git a/src/kern/tru64/tru64_events.cc b/src/kern/tru64/tru64_events.cc
index 460f75dea..7b8cf0db9 100644
--- a/src/kern/tru64/tru64_events.cc
+++ b/src/kern/tru64/tru64_events.cc
@@ -32,12 +32,12 @@
#include "arch/alpha/ev5.hh"
#include "arch/isa_traits.hh"
#include "config/the_isa.hh"
-#include "cpu/thread_context.hh"
#include "cpu/base.hh"
-#include "kern/system_events.hh"
-#include "kern/tru64/tru64_events.hh"
+#include "cpu/thread_context.hh"
#include "kern/tru64/dump_mbuf.hh"
#include "kern/tru64/printf.hh"
+#include "kern/tru64/tru64_events.hh"
+#include "kern/system_events.hh"
#include "sim/arguments.hh"
#include "sim/system.hh"
diff --git a/src/mem/bridge.hh b/src/mem/bridge.hh
index 0583b29a6..732717dd4 100644
--- a/src/mem/bridge.hh
+++ b/src/mem/bridge.hh
@@ -37,9 +37,9 @@
#ifndef __MEM_BRIDGE_HH__
#define __MEM_BRIDGE_HH__
-#include <string>
#include <list>
#include <queue>
+#include <string>
#include "base/fast_alloc.hh"
#include "base/types.hh"
diff --git a/src/mem/bus.hh b/src/mem/bus.hh
index ba02e3328..17d22ec83 100644
--- a/src/mem/bus.hh
+++ b/src/mem/bus.hh
@@ -37,9 +37,9 @@
#ifndef __MEM_BUS_HH__
#define __MEM_BUS_HH__
-#include <string>
-#include <set>
#include <list>
+#include <set>
+#include <string>
#include "base/hashmap.hh"
#include "base/range.hh"
diff --git a/src/mem/cache/base.hh b/src/mem/cache/base.hh
index 28ddf5054..d1ddedbd4 100644
--- a/src/mem/cache/base.hh
+++ b/src/mem/cache/base.hh
@@ -51,8 +51,8 @@
#include "mem/cache/mshr_queue.hh"
#include "mem/mem_object.hh"
#include "mem/packet.hh"
-#include "mem/tport.hh"
#include "mem/request.hh"
+#include "mem/tport.hh"
#include "params/BaseCache.hh"
#include "sim/eventq.hh"
#include "sim/sim_exit.hh"
diff --git a/src/mem/cache/blk.hh b/src/mem/cache/blk.hh
index bf17a303a..e70760edd 100644
--- a/src/mem/cache/blk.hh
+++ b/src/mem/cache/blk.hh
@@ -38,9 +38,9 @@
#include <list>
#include "base/printable.hh"
-#include "sim/core.hh" // for Tick
#include "mem/packet.hh"
#include "mem/request.hh"
+#include "sim/core.hh" // for Tick
/**
* Cache block status bit assignments
diff --git a/src/mem/cache/builder.cc b/src/mem/cache/builder.cc
index d4ef886f0..e2c14ef5b 100644
--- a/src/mem/cache/builder.cc
+++ b/src/mem/cache/builder.cc
@@ -38,9 +38,9 @@
#include "config/the_isa.hh"
#include "enums/Prefetch.hh"
-#include "mem/config/cache.hh"
#include "mem/cache/base.hh"
#include "mem/cache/cache.hh"
+#include "mem/config/cache.hh"
#include "mem/bus.hh"
#include "params/BaseCache.hh"
@@ -59,9 +59,8 @@
//Prefetcher Headers
#include "mem/cache/prefetch/ghb.hh"
-#include "mem/cache/prefetch/tagged.hh"
#include "mem/cache/prefetch/stride.hh"
-
+#include "mem/cache/prefetch/tagged.hh"
using namespace std;
diff --git a/src/mem/cache/cache.hh b/src/mem/cache/cache.hh
index e15747c3f..1ed138bb5 100644
--- a/src/mem/cache/cache.hh
+++ b/src/mem/cache/cache.hh
@@ -40,11 +40,9 @@
#define __CACHE_HH__
#include "base/misc.hh" // fatal, panic, and warn
-
#include "mem/cache/base.hh"
#include "mem/cache/blk.hh"
#include "mem/cache/mshr.hh"
-
#include "sim/eventq.hh"
//Forward decleration
diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh
index 0b2b273f9..5fb95fc06 100644
--- a/src/mem/cache/cache_impl.hh
+++ b/src/mem/cache/cache_impl.hh
@@ -54,10 +54,10 @@
#include "base/misc.hh"
#include "base/range.hh"
#include "base/types.hh"
+#include "mem/cache/prefetch/base.hh"
#include "mem/cache/blk.hh"
#include "mem/cache/cache.hh"
#include "mem/cache/mshr.hh"
-#include "mem/cache/prefetch/base.hh"
#include "sim/sim_exit.hh"
template<class TagStore>
diff --git a/src/mem/cache/mshr_queue.hh b/src/mem/cache/mshr_queue.hh
index 5a8739fc7..89dd87fb4 100644
--- a/src/mem/cache/mshr_queue.hh
+++ b/src/mem/cache/mshr_queue.hh
@@ -37,8 +37,8 @@
#include <vector>
-#include "mem/packet.hh"
#include "mem/cache/mshr.hh"
+#include "mem/packet.hh"
/**
* A Class for maintaining a list of pending and allocated memory requests.
diff --git a/src/mem/cache/prefetch/base.cc b/src/mem/cache/prefetch/base.cc
index ad7a0c882..c81f02933 100644
--- a/src/mem/cache/prefetch/base.cc
+++ b/src/mem/cache/prefetch/base.cc
@@ -38,8 +38,8 @@
#include "arch/isa_traits.hh"
#include "base/trace.hh"
#include "config/the_isa.hh"
-#include "mem/cache/base.hh"
#include "mem/cache/prefetch/base.hh"
+#include "mem/cache/base.hh"
#include "mem/request.hh"
BasePrefetcher::BasePrefetcher(const BaseCacheParams *p)
diff --git a/src/mem/cache/prefetch/stride.hh b/src/mem/cache/prefetch/stride.hh
index 6ccd32b91..c78739b4e 100644
--- a/src/mem/cache/prefetch/stride.hh
+++ b/src/mem/cache/prefetch/stride.hh
@@ -36,7 +36,8 @@
#ifndef __MEM_CACHE_PREFETCH_STRIDE_PREFETCHER_HH__
#define __MEM_CACHE_PREFETCH_STRIDE_PREFETCHER_HH__
-#include <limits.h>
+#include <climits>
+
#include "mem/cache/prefetch/base.hh"
class StridePrefetcher : public BasePrefetcher
diff --git a/src/mem/cache/tags/base.cc b/src/mem/cache/tags/base.cc
index 41cc11b23..d4d7542a0 100644
--- a/src/mem/cache/tags/base.cc
+++ b/src/mem/cache/tags/base.cc
@@ -34,10 +34,9 @@
* Definitions of BaseTags.
*/
+#include "cpu/smt.hh" //maxThreadsPerCPU
#include "mem/cache/tags/base.hh"
-
#include "mem/cache/base.hh"
-#include "cpu/smt.hh" //maxThreadsPerCPU
#include "sim/sim_exit.hh"
using namespace std;
diff --git a/src/mem/cache/tags/base.hh b/src/mem/cache/tags/base.hh
index 62ae4a032..93856c19e 100644
--- a/src/mem/cache/tags/base.hh
+++ b/src/mem/cache/tags/base.hh
@@ -38,8 +38,9 @@
#define __BASE_TAGS_HH__
#include <string>
-#include "base/statistics.hh"
+
#include "base/callback.hh"
+#include "base/statistics.hh"
class BaseCache;
diff --git a/src/mem/cache/tags/cacheset.hh b/src/mem/cache/tags/cacheset.hh
index 135e993aa..a1cf937cf 100644
--- a/src/mem/cache/tags/cacheset.hh
+++ b/src/mem/cache/tags/cacheset.hh
@@ -36,9 +36,9 @@
#ifndef __CACHESET_HH__
#define __CACHESET_HH__
-#include "mem/cache/blk.hh" // base class
-#include <assert.h>
+#include <cassert>
+#include "mem/cache/blk.hh" // base class
/**
* An associative set of cache blocks.
diff --git a/src/mem/cache/tags/fa_lru.hh b/src/mem/cache/tags/fa_lru.hh
index 94ffeaa58..78f9ce1b4 100644
--- a/src/mem/cache/tags/fa_lru.hh
+++ b/src/mem/cache/tags/fa_lru.hh
@@ -39,8 +39,8 @@
#include <list>
#include "base/hashmap.hh"
-#include "mem/cache/blk.hh"
#include "mem/cache/tags/base.hh"
+#include "mem/cache/blk.hh"
#include "mem/packet.hh"
/**
diff --git a/src/mem/cache/tags/iic.cc b/src/mem/cache/tags/iic.cc
index 743c6894f..d0e97de02 100644
--- a/src/mem/cache/tags/iic.cc
+++ b/src/mem/cache/tags/iic.cc
@@ -40,8 +40,8 @@
#include "base/intmath.hh"
#include "base/trace.hh"
-#include "mem/cache/base.hh"
#include "mem/cache/tags/iic.hh"
+#include "mem/cache/base.hh"
#include "sim/core.hh"
using namespace std;
diff --git a/src/mem/cache/tags/iic.hh b/src/mem/cache/tags/iic.hh
index 5553b8ca3..0c3ea7a13 100644
--- a/src/mem/cache/tags/iic.hh
+++ b/src/mem/cache/tags/iic.hh
@@ -39,11 +39,11 @@
#include <list>
#include <vector>
-#include "mem/cache/blk.hh"
-#include "mem/cache/tags/iic_repl/repl.hh"
-#include "mem/packet.hh"
#include "base/statistics.hh"
+#include "mem/cache/tags/iic_repl/repl.hh"
#include "mem/cache/tags/base.hh"
+#include "mem/cache/blk.hh"
+#include "mem/packet.hh"
class BaseCache; // Forward declaration
diff --git a/src/mem/cache/tags/iic_repl/gen.cc b/src/mem/cache/tags/iic_repl/gen.cc
index 0d1b30220..7a1e7a110 100644
--- a/src/mem/cache/tags/iic_repl/gen.cc
+++ b/src/mem/cache/tags/iic_repl/gen.cc
@@ -38,8 +38,8 @@
#include "base/misc.hh"
#include "base/types.hh"
-#include "mem/cache/tags/iic.hh"
#include "mem/cache/tags/iic_repl/gen.hh"
+#include "mem/cache/tags/iic.hh"
#include "params/GenRepl.hh"
using namespace std;
diff --git a/src/mem/cache/tags/iic_repl/repl.hh b/src/mem/cache/tags/iic_repl/repl.hh
index c792e3350..994af5164 100644
--- a/src/mem/cache/tags/iic_repl/repl.hh
+++ b/src/mem/cache/tags/iic_repl/repl.hh
@@ -38,8 +38,8 @@
#ifndef __REPL_HH__
#define __REPL_HH__
-#include <string>
#include <list>
+#include <string>
#include "base/types.hh"
#include "cpu/smt.hh"
diff --git a/src/mem/cache/tags/lru.cc b/src/mem/cache/tags/lru.cc
index 25e98d293..33517a5f5 100644
--- a/src/mem/cache/tags/lru.cc
+++ b/src/mem/cache/tags/lru.cc
@@ -36,9 +36,9 @@
#include <string>
#include "base/intmath.hh"
-#include "mem/cache/base.hh"
#include "mem/cache/tags/cacheset.hh"
#include "mem/cache/tags/lru.hh"
+#include "mem/cache/base.hh"
#include "sim/core.hh"
using namespace std;
diff --git a/src/mem/cache/tags/lru.hh b/src/mem/cache/tags/lru.hh
index ff9811046..4eb66b708 100644
--- a/src/mem/cache/tags/lru.hh
+++ b/src/mem/cache/tags/lru.hh
@@ -40,8 +40,8 @@
#include <cstring>
#include <list>
-#include "mem/cache/blk.hh"
#include "mem/cache/tags/base.hh"
+#include "mem/cache/blk.hh"
#include "mem/packet.hh"
class BaseCache;
diff --git a/src/mem/packet.cc b/src/mem/packet.cc
index 547695697..0296e7f0b 100644
--- a/src/mem/packet.cc
+++ b/src/mem/packet.cc
@@ -36,8 +36,9 @@
* between a single level of the memory heirarchy (ie L1->L2).
*/
-#include <iostream>
#include <cstring>
+#include <iostream>
+
#include "base/cprintf.hh"
#include "base/misc.hh"
#include "base/trace.hh"
diff --git a/src/mem/packet.hh b/src/mem/packet.hh
index 7e75dc297..5fcd9286e 100644
--- a/src/mem/packet.hh
+++ b/src/mem/packet.hh
@@ -39,9 +39,9 @@
#ifndef __MEM_PACKET_HH__
#define __MEM_PACKET_HH__
+#include <bitset>
#include <cassert>
#include <list>
-#include <bitset>
#include "base/cast.hh"
#include "base/compiler.hh"
diff --git a/src/mem/page_table.cc b/src/mem/page_table.cc
index 7e6eac372..861c4a805 100644
--- a/src/mem/page_table.cc
+++ b/src/mem/page_table.cc
@@ -34,9 +34,9 @@
* @file
* Definitions of page table.
*/
-#include <string>
-#include <map>
#include <fstream>
+#include <map>
+#include <string>
#include "base/bitfield.hh"
#include "base/intmath.hh"
diff --git a/src/mem/physical.cc b/src/mem/physical.cc
index e7c96ab54..fa9ec7e23 100644
--- a/src/mem/physical.cc
+++ b/src/mem/physical.cc
@@ -41,14 +41,14 @@
* Ali Saidi
*/
-#include <sys/types.h>
#include <sys/mman.h>
+#include <sys/types.h>
#include <sys/user.h>
-#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <zlib.h>
+#include <cerrno>
#include <cstdio>
#include <iostream>
#include <string>
diff --git a/src/mem/ruby/buffers/MessageBuffer.hh b/src/mem/ruby/buffers/MessageBuffer.hh
index a59b82077..dc9fb1a9e 100644
--- a/src/mem/ruby/buffers/MessageBuffer.hh
+++ b/src/mem/ruby/buffers/MessageBuffer.hh
@@ -38,15 +38,15 @@
#include <cassert>
#include <functional>
#include <iostream>
-#include <vector>
#include <string>
+#include <vector>
#include "mem/ruby/buffers/MessageBufferNode.hh"
+#include "mem/ruby/common/Address.hh"
#include "mem/ruby/common/Consumer.hh"
#include "mem/ruby/common/Global.hh"
#include "mem/ruby/eventqueue/RubyEventQueue.hh"
#include "mem/ruby/slicc_interface/Message.hh"
-#include "mem/ruby/common/Address.hh"
class MessageBuffer
{
diff --git a/src/mem/ruby/common/NetDest.cc b/src/mem/ruby/common/NetDest.cc
index 657df08b2..12eaa0321 100644
--- a/src/mem/ruby/common/NetDest.cc
+++ b/src/mem/ruby/common/NetDest.cc
@@ -26,8 +26,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "mem/ruby/common/NetDest.hh"
#include "mem/protocol/Protocol.hh"
+#include "mem/ruby/common/NetDest.hh"
NetDest::NetDest()
{
diff --git a/src/mem/ruby/common/Set.hh b/src/mem/ruby/common/Set.hh
index a0178178a..5481c2ec7 100644
--- a/src/mem/ruby/common/Set.hh
+++ b/src/mem/ruby/common/Set.hh
@@ -35,9 +35,9 @@
#include <iostream>
#include <limits>
-#include "mem/ruby/system/System.hh"
#include "mem/ruby/common/Global.hh"
#include "mem/ruby/system/NodeID.hh"
+#include "mem/ruby/system/System.hh"
class Set
{
diff --git a/src/mem/ruby/filters/GenericBloomFilter.hh b/src/mem/ruby/filters/GenericBloomFilter.hh
index 606f55d4f..a9d6b9ea2 100644
--- a/src/mem/ruby/filters/GenericBloomFilter.hh
+++ b/src/mem/ruby/filters/GenericBloomFilter.hh
@@ -32,8 +32,8 @@
#include <iostream>
#include <string>
-#include "mem/ruby/common/Global.hh"
#include "mem/ruby/common/Address.hh"
+#include "mem/ruby/common/Global.hh"
#include "mem/ruby/filters/AbstractBloomFilter.hh"
class GenericBloomFilter
diff --git a/src/mem/ruby/network/Network.cc b/src/mem/ruby/network/Network.cc
index 34ee18fea..3003ce7d9 100644
--- a/src/mem/ruby/network/Network.cc
+++ b/src/mem/ruby/network/Network.cc
@@ -28,8 +28,8 @@
#include "base/misc.hh"
#include "mem/protocol/MachineType.hh"
-#include "mem/ruby/network/Network.hh"
#include "mem/ruby/network/simple/Topology.hh"
+#include "mem/ruby/network/Network.hh"
Network::Network(const Params *p)
: SimObject(p)
diff --git a/src/mem/ruby/network/garnet/BaseGarnetNetwork.hh b/src/mem/ruby/network/garnet/BaseGarnetNetwork.hh
index d01225232..81b77ceea 100644
--- a/src/mem/ruby/network/garnet/BaseGarnetNetwork.hh
+++ b/src/mem/ruby/network/garnet/BaseGarnetNetwork.hh
@@ -36,10 +36,10 @@
#ifndef __MEM_RUBY_NETWORK_GARNET_BASEGARNETNETWORK_HH__
#define __MEM_RUBY_NETWORK_GARNET_BASEGARNETNETWORK_HH__
-#include "math.h"
#include "mem/ruby/network/garnet/NetworkHeader.hh"
#include "mem/ruby/network/Network.hh"
#include "params/BaseGarnetNetwork.hh"
+#include "math.h"
class BaseGarnetNetwork : public Network
{
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
index 5cbff7db6..ad0c06452 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.cc
@@ -31,15 +31,15 @@
#include <cassert>
#include "base/stl_helpers.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh"
#include "mem/protocol/MachineType.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh"
#include "mem/ruby/buffers/MessageBuffer.hh"
+#include "mem/ruby/common/NetDest.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/CreditLink_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/Router_d.hh"
#include "mem/ruby/network/simple/Topology.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/CreditLink_d.hh"
-#include "mem/ruby/common/NetDest.hh"
using namespace std;
using m5::stl_helpers::deletePointers;
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh
index 1fe65f18d..f403660ea 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh
@@ -34,8 +34,8 @@
#include <iostream>
#include <vector>
-#include "mem/ruby/network/garnet/NetworkHeader.hh"
#include "mem/ruby/network/garnet/BaseGarnetNetwork.hh"
+#include "mem/ruby/network/garnet/NetworkHeader.hh"
#include "mem/ruby/network/Network.hh"
#include "params/GarnetNetwork_d.hh"
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.hh
index 81c60f7e1..de3fa9d40 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.hh
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.hh
@@ -34,12 +34,12 @@
#include <iostream>
#include <vector>
-#include "mem/ruby/network/garnet/NetworkHeader.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/flitBuffer_d.hh"
#include "mem/ruby/common/Consumer.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/CreditLink_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/flitBuffer_d.hh"
+#include "mem/ruby/network/garnet/NetworkHeader.hh"
class Router_d;
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc
index 14105a38c..d7f275fc2 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc
@@ -32,8 +32,8 @@
#include <cmath>
#include "base/stl_helpers.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh"
#include "mem/ruby/buffers/MessageBuffer.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/flitBuffer_d.hh"
#include "mem/ruby/slicc_interface/NetworkMessage.hh"
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh
index f1a577e4c..3802082a6 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.hh
@@ -34,13 +34,13 @@
#include <iostream>
#include <vector>
-#include "mem/ruby/network/garnet/NetworkHeader.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh"
#include "mem/ruby/common/Consumer.hh"
-#include "mem/ruby/slicc_interface/Message.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/CreditLink_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.hh"
+#include "mem/ruby/network/garnet/NetworkHeader.hh"
+#include "mem/ruby/slicc_interface/Message.hh"
class NetworkMessage;
class MessageBuffer;
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.cc
index 518281414..72439a67b 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.cc
@@ -28,8 +28,8 @@
* Authors: Niket Agarwal
*/
-#include "mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh"
NetworkLink_d::NetworkLink_d(int id, int link_latency, GarnetNetwork_d *net_ptr)
{
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh
index 8024ebd9c..a46c59f41 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh
@@ -34,9 +34,9 @@
#include <iostream>
#include <vector>
-#include "mem/ruby/network/garnet/NetworkHeader.hh"
#include "mem/ruby/common/Consumer.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/flitBuffer_d.hh"
+#include "mem/ruby/network/garnet/NetworkHeader.hh"
#include "mem/ruby/network/orion/NetworkPower.hh"
class GarnetNetwork_d;
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.cc
index ee89ec004..8a2022a4f 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.cc
@@ -28,8 +28,8 @@
* Authors: Niket Agarwal
*/
-#include "mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.hh"
#include "mem/ruby/eventqueue/RubyEventQueue.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.hh"
OutVcState_d::OutVcState_d(int id, GarnetNetwork_d *network_ptr)
{
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.hh
index 39b2cb5fe..5b1328fcf 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.hh
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.hh
@@ -31,8 +31,8 @@
#ifndef __MEM_RUBY_NETWORK_GARNET_FIXED_PIPELINE_OUT_VC_STATE_D_HH__
#define __MEM_RUBY_NETWORK_GARNET_FIXED_PIPELINE_OUT_VC_STATE_D_HH__
-#include "mem/ruby/network/garnet/NetworkHeader.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh"
+#include "mem/ruby/network/garnet/NetworkHeader.hh"
class OutVcState_d
{
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/OutputUnit_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/OutputUnit_d.hh
index 98d6147de..3ed1cb4b2 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/OutputUnit_d.hh
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/OutputUnit_d.hh
@@ -34,12 +34,12 @@
#include <iostream>
#include <vector>
-#include "mem/ruby/network/garnet/NetworkHeader.hh"
#include "mem/ruby/common/Consumer.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/flitBuffer_d.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/CreditLink_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/OutVcState_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/flitBuffer_d.hh"
+#include "mem/ruby/network/garnet/NetworkHeader.hh"
class Router_d;
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/Router_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/Router_d.cc
index 4ee176653..15cddd3b7 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/Router_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/Router_d.cc
@@ -29,16 +29,16 @@
*/
#include "base/stl_helpers.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/Router_d.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/CreditLink_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/OutputUnit_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/Router_d.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/Switch_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.hh"
using namespace std;
using m5::stl_helpers::deletePointers;
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh
index f7af30ce9..4c2b83312 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/Router_d.hh
@@ -34,9 +34,9 @@
#include <iostream>
#include <vector>
-#include "mem/ruby/network/garnet/NetworkHeader.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/flit_d.hh"
#include "mem/ruby/common/NetDest.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/flit_d.hh"
+#include "mem/ruby/network/garnet/NetworkHeader.hh"
#include "mem/ruby/network/orion/NetworkPower.hh"
class GarnetNetwork_d;
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.cc
index 13491184c..7c7a7d428 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.cc
@@ -28,9 +28,9 @@
* Authors: Niket Agarwal
*/
-#include "mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/Router_d.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/Router_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.hh"
#include "mem/ruby/slicc_interface/NetworkMessage.hh"
RoutingUnit_d::RoutingUnit_d(Router_d *router)
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.hh
index 7ae216049..15e893150 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.hh
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.hh
@@ -31,10 +31,10 @@
#ifndef __MEM_RUBY_NETWORK_GARNET_FIXED_PIPELINE_ROUTING_UNIT_D_HH__
#define __MEM_RUBY_NETWORK_GARNET_FIXED_PIPELINE_ROUTING_UNIT_D_HH__
-#include "mem/ruby/network/garnet/NetworkHeader.hh"
#include "mem/ruby/common/Consumer.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/flit_d.hh"
#include "mem/ruby/common/NetDest.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/flit_d.hh"
+#include "mem/ruby/network/garnet/NetworkHeader.hh"
class InputUnit_d;
class Router_d;
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc
index 704157589..afed4b205 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc
@@ -28,11 +28,11 @@
* Authors: Niket Agarwal
*/
-#include "mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/Router_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/OutputUnit_d.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/Router_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.hh"
SWallocator_d::SWallocator_d(Router_d *router)
{
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.hh
index 66b522950..15f7b8bfe 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.hh
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.hh
@@ -34,8 +34,8 @@
#include <iostream>
#include <vector>
-#include "mem/ruby/network/garnet/NetworkHeader.hh"
#include "mem/ruby/common/Consumer.hh"
+#include "mem/ruby/network/garnet/NetworkHeader.hh"
class Router_d;
class InputUnit_d;
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc
index 50aa16cea..62510a45c 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.cc
@@ -29,9 +29,9 @@
*/
#include "base/stl_helpers.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/Switch_d.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/Router_d.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/OutputUnit_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/Router_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/Switch_d.hh"
using m5::stl_helpers::deletePointers;
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.hh
index 2ba761c69..7ffaf423e 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.hh
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/Switch_d.hh
@@ -34,9 +34,9 @@
#include <iostream>
#include <vector>
-#include "mem/ruby/network/garnet/NetworkHeader.hh"
#include "mem/ruby/common/Consumer.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/flitBuffer_d.hh"
+#include "mem/ruby/network/garnet/NetworkHeader.hh"
class Router_d;
class OutputUnit_d;
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.cc
index 326c7fa92..03eed6ce2 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.cc
@@ -28,11 +28,11 @@
* Authors: Niket Agarwal
*/
-#include "mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/Router_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/OutputUnit_d.hh"
-#include "mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/Router_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.hh"
VCallocator_d::VCallocator_d(Router_d *router)
{
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.hh
index 789338244..d28c6f82f 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.hh
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/VCallocator_d.hh
@@ -32,11 +32,11 @@
#define __MEM_RUBY_NETWORK_GARNET_FIXED_PIPELINE_VC_ALLOCATOR_D_HH__
#include <iostream>
-#include <vector>
#include <utility>
+#include <vector>
-#include "mem/ruby/network/garnet/NetworkHeader.hh"
#include "mem/ruby/common/Consumer.hh"
+#include "mem/ruby/network/garnet/NetworkHeader.hh"
class Router_d;
class InputUnit_d;
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.hh
index 075e2ee02..3f5c02f84 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.hh
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/VirtualChannel_d.hh
@@ -33,8 +33,8 @@
#include <utility>
-#include "mem/ruby/network/garnet/NetworkHeader.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/flitBuffer_d.hh"
+#include "mem/ruby/network/garnet/NetworkHeader.hh"
class VirtualChannel_d
{
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/flitBuffer_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/flitBuffer_d.hh
index 3cfd9144f..23cbd0bb3 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/flitBuffer_d.hh
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/flitBuffer_d.hh
@@ -35,8 +35,8 @@
#include <iostream>
#include <vector>
-#include "mem/ruby/network/garnet/NetworkHeader.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/flit_d.hh"
+#include "mem/ruby/network/garnet/NetworkHeader.hh"
class flitBuffer_d
{
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/FlexibleConsumer.hh b/src/mem/ruby/network/garnet/flexible-pipeline/FlexibleConsumer.hh
index 2f38fc158..04a4ac95a 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/FlexibleConsumer.hh
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/FlexibleConsumer.hh
@@ -32,8 +32,8 @@
#define __MEM_RUBY_NETWORK_GARNET_FLEXIBLE_PIPELINE_FLEXIBLE_CONSUMER_HH__
#include "mem/ruby/common/Consumer.hh"
-#include "mem/ruby/network/garnet/NetworkHeader.hh"
#include "mem/ruby/common/NetDest.hh"
+#include "mem/ruby/network/garnet/NetworkHeader.hh"
class FlexibleConsumer : public Consumer
{
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc
index 205eb1472..b6a9d599d 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.cc
@@ -31,16 +31,16 @@
#include <cassert>
#include "base/stl_helpers.hh"
-#include "mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh"
#include "mem/protocol/MachineType.hh"
-#include "mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.hh"
#include "mem/ruby/buffers/MessageBuffer.hh"
-#include "mem/ruby/network/garnet/flexible-pipeline/Router.hh"
-#include "mem/ruby/network/simple/Topology.hh"
-#include "mem/ruby/network/simple/SimpleNetwork.hh"
+#include "mem/ruby/common/NetDest.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh"
+#include "mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh"
+#include "mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.hh"
#include "mem/ruby/network/garnet/flexible-pipeline/NetworkLink.hh"
-#include "mem/ruby/common/NetDest.hh"
+#include "mem/ruby/network/garnet/flexible-pipeline/Router.hh"
+#include "mem/ruby/network/simple/SimpleNetwork.hh"
+#include "mem/ruby/network/simple/Topology.hh"
using namespace std;
using m5::stl_helpers::deletePointers;
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh
index 51a9380cb..b04e649df 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh
@@ -34,8 +34,8 @@
#include <iostream>
#include <vector>
-#include "mem/ruby/network/garnet/NetworkHeader.hh"
#include "mem/ruby/network/garnet/BaseGarnetNetwork.hh"
+#include "mem/ruby/network/garnet/NetworkHeader.hh"
#include "mem/ruby/network/Network.hh"
#include "params/GarnetNetwork.hh"
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc
index 11da465a8..c4c804206 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc
@@ -32,8 +32,8 @@
#include <cmath>
#include "base/stl_helpers.hh"
-#include "mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.hh"
#include "mem/ruby/buffers/MessageBuffer.hh"
+#include "mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.hh"
#include "mem/ruby/network/garnet/flexible-pipeline/flitBuffer.hh"
#include "mem/ruby/slicc_interface/NetworkMessage.hh"
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.hh b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.hh
index 401a8bc23..c358f420f 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.hh
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.hh
@@ -34,12 +34,12 @@
#include <iostream>
#include <vector>
-#include "mem/ruby/network/garnet/NetworkHeader.hh"
-#include "mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh"
#include "mem/ruby/network/garnet/flexible-pipeline/FlexibleConsumer.hh"
-#include "mem/ruby/slicc_interface/Message.hh"
+#include "mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh"
#include "mem/ruby/network/garnet/flexible-pipeline/NetworkLink.hh"
#include "mem/ruby/network/garnet/flexible-pipeline/OutVcState.hh"
+#include "mem/ruby/network/garnet/NetworkHeader.hh"
+#include "mem/ruby/slicc_interface/Message.hh"
class NetworkMessage;
class MessageBuffer;
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkLink.cc b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkLink.cc
index 24b93c975..8badcb812 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkLink.cc
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkLink.cc
@@ -28,8 +28,8 @@
* Authors: Niket Agarwal
*/
-#include "mem/ruby/network/garnet/flexible-pipeline/NetworkLink.hh"
#include "mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh"
+#include "mem/ruby/network/garnet/flexible-pipeline/NetworkLink.hh"
NetworkLink::NetworkLink(int id, int latency, GarnetNetwork *net_ptr)
{
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkLink.hh b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkLink.hh
index 3915448c5..cf2903a19 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/NetworkLink.hh
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/NetworkLink.hh
@@ -34,10 +34,10 @@
#include <iostream>
#include <vector>
-#include "mem/ruby/network/garnet/NetworkHeader.hh"
+#include "mem/ruby/common/NetDest.hh"
#include "mem/ruby/network/garnet/flexible-pipeline/FlexibleConsumer.hh"
#include "mem/ruby/network/garnet/flexible-pipeline/flitBuffer.hh"
-#include "mem/ruby/common/NetDest.hh"
+#include "mem/ruby/network/garnet/NetworkHeader.hh"
class GarnetNetwork;
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/Router.cc b/src/mem/ruby/network/garnet/flexible-pipeline/Router.cc
index 4a0d59973..d7d242b96 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/Router.cc
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/Router.cc
@@ -29,11 +29,11 @@
*/
#include "base/stl_helpers.hh"
-#include "mem/ruby/network/garnet/flexible-pipeline/Router.hh"
-#include "mem/ruby/slicc_interface/NetworkMessage.hh"
#include "mem/ruby/network/garnet/flexible-pipeline/InVcState.hh"
#include "mem/ruby/network/garnet/flexible-pipeline/OutVcState.hh"
+#include "mem/ruby/network/garnet/flexible-pipeline/Router.hh"
#include "mem/ruby/network/garnet/flexible-pipeline/VCarbiter.hh"
+#include "mem/ruby/slicc_interface/NetworkMessage.hh"
using namespace std;
using m5::stl_helpers::deletePointers;
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/Router.hh b/src/mem/ruby/network/garnet/flexible-pipeline/Router.hh
index 8f240551c..99b9cc1c3 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/Router.hh
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/Router.hh
@@ -34,14 +34,14 @@
#include <iostream>
#include <vector>
-#include "mem/ruby/network/garnet/NetworkHeader.hh"
-#include "mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh"
-#include "mem/ruby/network/garnet/flexible-pipeline/FlexibleConsumer.hh"
-#include "mem/ruby/network/garnet/flexible-pipeline/NetworkLink.hh"
#include "mem/ruby/common/NetDest.hh"
-#include "mem/ruby/network/garnet/flexible-pipeline/flitBuffer.hh"
+#include "mem/ruby/network/garnet/flexible-pipeline/FlexibleConsumer.hh"
+#include "mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh"
#include "mem/ruby/network/garnet/flexible-pipeline/InVcState.hh"
+#include "mem/ruby/network/garnet/flexible-pipeline/NetworkLink.hh"
#include "mem/ruby/network/garnet/flexible-pipeline/OutVcState.hh"
+#include "mem/ruby/network/garnet/flexible-pipeline/flitBuffer.hh"
+#include "mem/ruby/network/garnet/NetworkHeader.hh"
class VCarbiter;
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/VCarbiter.cc b/src/mem/ruby/network/garnet/flexible-pipeline/VCarbiter.cc
index f1960d62d..e68e1b12f 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/VCarbiter.cc
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/VCarbiter.cc
@@ -28,8 +28,8 @@
* Authors: Niket Agarwal
*/
-#include "mem/ruby/network/garnet/flexible-pipeline/VCarbiter.hh"
#include "mem/ruby/network/garnet/flexible-pipeline/Router.hh"
+#include "mem/ruby/network/garnet/flexible-pipeline/VCarbiter.hh"
VCarbiter::VCarbiter(Router *router)
{
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/VCarbiter.hh b/src/mem/ruby/network/garnet/flexible-pipeline/VCarbiter.hh
index 7aa6f9fc1..a56bfae0d 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/VCarbiter.hh
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/VCarbiter.hh
@@ -33,8 +33,8 @@
#include <iostream>
-#include "mem/ruby/network/garnet/NetworkHeader.hh"
#include "mem/ruby/common/Consumer.hh"
+#include "mem/ruby/network/garnet/NetworkHeader.hh"
class Router;
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/flitBuffer.hh b/src/mem/ruby/network/garnet/flexible-pipeline/flitBuffer.hh
index 619f3285f..e5628e93e 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/flitBuffer.hh
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/flitBuffer.hh
@@ -34,8 +34,8 @@
#include <iostream>
#include <vector>
-#include "mem/ruby/network/garnet/NetworkHeader.hh"
#include "mem/ruby/network/garnet/flexible-pipeline/flit.hh"
+#include "mem/ruby/network/garnet/NetworkHeader.hh"
class flitBuffer
{
diff --git a/src/mem/ruby/network/orion/Allocator/Arbiter.cc b/src/mem/ruby/network/orion/Allocator/Arbiter.cc
index 2f6c60301..a4f480ae5 100644
--- a/src/mem/ruby/network/orion/Allocator/Arbiter.cc
+++ b/src/mem/ruby/network/orion/Allocator/Arbiter.cc
@@ -33,8 +33,8 @@
* Kambiz Samadi (Orion 2.0, UC San Diego)
*/
-#include <iostream>
#include <cassert>
+#include <iostream>
#include "mem/ruby/network/orion/Allocator/Arbiter.hh"
#include "mem/ruby/network/orion/Allocator/MatrixArbiter.hh"
diff --git a/src/mem/ruby/network/orion/Allocator/MatrixArbiter.hh b/src/mem/ruby/network/orion/Allocator/MatrixArbiter.hh
index 7cb277a50..a4a74f25f 100644
--- a/src/mem/ruby/network/orion/Allocator/MatrixArbiter.hh
+++ b/src/mem/ruby/network/orion/Allocator/MatrixArbiter.hh
@@ -36,9 +36,8 @@
#ifndef __MATRIXARBITER_H__
#define __MATRIXARBITER_H__
-#include "mem/ruby/network/orion/Type.hh"
-
#include "mem/ruby/network/orion/Allocator/Arbiter.hh"
+#include "mem/ruby/network/orion/Type.hh"
class TechParameter;
diff --git a/src/mem/ruby/network/orion/Allocator/RRArbiter.cc b/src/mem/ruby/network/orion/Allocator/RRArbiter.cc
index 0dad2c5b7..c30be475a 100644
--- a/src/mem/ruby/network/orion/Allocator/RRArbiter.cc
+++ b/src/mem/ruby/network/orion/Allocator/RRArbiter.cc
@@ -33,12 +33,12 @@
* Kambiz Samadi (Orion 2.0, UC San Diego)
*/
-#include <iostream>
#include <cmath>
+#include <iostream>
#include "mem/ruby/network/orion/Allocator/RRArbiter.hh"
-#include "mem/ruby/network/orion/TechParameter.hh"
#include "mem/ruby/network/orion/FlipFlop.hh"
+#include "mem/ruby/network/orion/TechParameter.hh"
using namespace std;
diff --git a/src/mem/ruby/network/orion/Allocator/RRArbiter.hh b/src/mem/ruby/network/orion/Allocator/RRArbiter.hh
index 24b4d38b8..e3d392e01 100644
--- a/src/mem/ruby/network/orion/Allocator/RRArbiter.hh
+++ b/src/mem/ruby/network/orion/Allocator/RRArbiter.hh
@@ -36,8 +36,8 @@
#ifndef __RRARBITER_H__
#define __RRARBITER_H__
-#include "mem/ruby/network/orion/Type.hh"
#include "mem/ruby/network/orion/Allocator/Arbiter.hh"
+#include "mem/ruby/network/orion/Type.hh"
class TechParameter;
diff --git a/src/mem/ruby/network/orion/Allocator/SWAllocator.cc b/src/mem/ruby/network/orion/Allocator/SWAllocator.cc
index 366779e45..0211d5ea9 100644
--- a/src/mem/ruby/network/orion/Allocator/SWAllocator.cc
+++ b/src/mem/ruby/network/orion/Allocator/SWAllocator.cc
@@ -33,13 +33,13 @@
* Kambiz Samadi (Orion 2.0, UC San Diego)
*/
-#include <iostream>
#include <cassert>
+#include <iostream>
-#include "mem/ruby/network/orion/Allocator/SWAllocator.hh"
-#include "mem/ruby/network/orion/OrionConfig.hh"
#include "mem/ruby/network/orion/Allocator/Arbiter.hh"
+#include "mem/ruby/network/orion/Allocator/SWAllocator.hh"
#include "mem/ruby/network/orion/Crossbar/Crossbar.hh"
+#include "mem/ruby/network/orion/OrionConfig.hh"
using namespace std;
diff --git a/src/mem/ruby/network/orion/Allocator/VCAllocator.cc b/src/mem/ruby/network/orion/Allocator/VCAllocator.cc
index 38ac985f3..2f3ae2df2 100644
--- a/src/mem/ruby/network/orion/Allocator/VCAllocator.cc
+++ b/src/mem/ruby/network/orion/Allocator/VCAllocator.cc
@@ -33,15 +33,15 @@
* Kambiz Samadi (Orion 2.0, UC San Diego)
*/
-#include <iostream>
#include <cassert>
-#include <cstdlib>
#include <cmath>
+#include <cstdlib>
+#include <iostream>
-#include "mem/ruby/network/orion/Allocator/VCAllocator.hh"
-#include "mem/ruby/network/orion/OrionConfig.hh"
#include "mem/ruby/network/orion/Allocator/Arbiter.hh"
+#include "mem/ruby/network/orion/Allocator/VCAllocator.hh"
#include "mem/ruby/network/orion/Buffer/Buffer.hh"
+#include "mem/ruby/network/orion/OrionConfig.hh"
using namespace std;
diff --git a/src/mem/ruby/network/orion/Buffer/Buffer.cc b/src/mem/ruby/network/orion/Buffer/Buffer.cc
index 11c92094f..b46aef6fd 100644
--- a/src/mem/ruby/network/orion/Buffer/Buffer.cc
+++ b/src/mem/ruby/network/orion/Buffer/Buffer.cc
@@ -33,14 +33,14 @@
* Kambiz Samadi (Orion 2.0, UC San Diego)
*/
-#include <iostream>
#include <cassert>
+#include <iostream>
#include "mem/ruby/network/orion/Buffer/Buffer.hh"
-#include "mem/ruby/network/orion/TechParameter.hh"
-#include "mem/ruby/network/orion/OrionConfig.hh"
-#include "mem/ruby/network/orion/Buffer/SRAM.hh"
#include "mem/ruby/network/orion/Buffer/Register.hh"
+#include "mem/ruby/network/orion/Buffer/SRAM.hh"
+#include "mem/ruby/network/orion/OrionConfig.hh"
+#include "mem/ruby/network/orion/TechParameter.hh"
using namespace std;
diff --git a/src/mem/ruby/network/orion/Buffer/DecoderUnit.hh b/src/mem/ruby/network/orion/Buffer/DecoderUnit.hh
index 93bee26ae..2ab32cd7a 100644
--- a/src/mem/ruby/network/orion/Buffer/DecoderUnit.hh
+++ b/src/mem/ruby/network/orion/Buffer/DecoderUnit.hh
@@ -36,8 +36,8 @@
#ifndef __DECODERUNIT_H__
#define __DECODERUNIT_H__
-#include "mem/ruby/network/orion/Type.hh"
#include "mem/ruby/network/orion/TechParameter.hh"
+#include "mem/ruby/network/orion/Type.hh"
class DecoderUnit
{
diff --git a/src/mem/ruby/network/orion/Buffer/OutdrvUnit.cc b/src/mem/ruby/network/orion/Buffer/OutdrvUnit.cc
index ce1707491..07ab5f202 100644
--- a/src/mem/ruby/network/orion/Buffer/OutdrvUnit.cc
+++ b/src/mem/ruby/network/orion/Buffer/OutdrvUnit.cc
@@ -35,8 +35,8 @@
#include "base/misc.hh"
#include "mem/ruby/network/orion/Buffer/OutdrvUnit.hh"
-#include "mem/ruby/network/orion/TechParameter.hh"
#include "mem/ruby/network/orion/Buffer/SRAM.hh"
+#include "mem/ruby/network/orion/TechParameter.hh"
OutdrvUnit::OutdrvUnit(
const string& outdrv_model_str_,
diff --git a/src/mem/ruby/network/orion/Buffer/PrechargeUnit.cc b/src/mem/ruby/network/orion/Buffer/PrechargeUnit.cc
index 480ebe82c..9d15843c6 100644
--- a/src/mem/ruby/network/orion/Buffer/PrechargeUnit.cc
+++ b/src/mem/ruby/network/orion/Buffer/PrechargeUnit.cc
@@ -35,8 +35,8 @@
#include "base/misc.hh"
#include "mem/ruby/network/orion/Buffer/PrechargeUnit.hh"
-#include "mem/ruby/network/orion/TechParameter.hh"
#include "mem/ruby/network/orion/Buffer/SRAM.hh"
+#include "mem/ruby/network/orion/TechParameter.hh"
PrechargeUnit::PrechargeUnit(
const string& pre_model_str_,
diff --git a/src/mem/ruby/network/orion/Buffer/Register.cc b/src/mem/ruby/network/orion/Buffer/Register.cc
index 364e5a833..933480f1e 100644
--- a/src/mem/ruby/network/orion/Buffer/Register.cc
+++ b/src/mem/ruby/network/orion/Buffer/Register.cc
@@ -33,12 +33,12 @@
* Kambiz Samadi (Orion 2.0, UC San Diego)
*/
-#include <iostream>
#include <cassert>
+#include <iostream>
#include "mem/ruby/network/orion/Buffer/Register.hh"
-#include "mem/ruby/network/orion/TechParameter.hh"
#include "mem/ruby/network/orion/FlipFlop.hh"
+#include "mem/ruby/network/orion/TechParameter.hh"
using namespace std;
diff --git a/src/mem/ruby/network/orion/Buffer/SRAM.cc b/src/mem/ruby/network/orion/Buffer/SRAM.cc
index d8f500de5..00460a32a 100644
--- a/src/mem/ruby/network/orion/Buffer/SRAM.cc
+++ b/src/mem/ruby/network/orion/Buffer/SRAM.cc
@@ -33,18 +33,18 @@
* Kambiz Samadi (Orion 2.0, UC San Diego)
*/
-#include <iostream>
-#include <cmath>
#include <cassert>
+#include <cmath>
+#include <iostream>
-#include "mem/ruby/network/orion/Buffer/SRAM.hh"
-#include "mem/ruby/network/orion/Buffer/OutdrvUnit.hh"
#include "mem/ruby/network/orion/Buffer/AmpUnit.hh"
#include "mem/ruby/network/orion/Buffer/BitlineUnit.hh"
+#include "mem/ruby/network/orion/Buffer/DecoderUnit.hh"
#include "mem/ruby/network/orion/Buffer/MemUnit.hh"
+#include "mem/ruby/network/orion/Buffer/OutdrvUnit.hh"
#include "mem/ruby/network/orion/Buffer/PrechargeUnit.hh"
+#include "mem/ruby/network/orion/Buffer/SRAM.hh"
#include "mem/ruby/network/orion/Buffer/WordlineUnit.hh"
-#include "mem/ruby/network/orion/Buffer/DecoderUnit.hh"
using namespace std;
diff --git a/src/mem/ruby/network/orion/Buffer/SRAM.hh b/src/mem/ruby/network/orion/Buffer/SRAM.hh
index 7b3f46698..959cc8278 100644
--- a/src/mem/ruby/network/orion/Buffer/SRAM.hh
+++ b/src/mem/ruby/network/orion/Buffer/SRAM.hh
@@ -36,9 +36,9 @@
#ifndef __SRAM_H__
#define __SRAM_H__
-#include "mem/ruby/network/orion/Type.hh"
#include "mem/ruby/network/orion/OrionConfig.hh"
#include "mem/ruby/network/orion/TechParameter.hh"
+#include "mem/ruby/network/orion/Type.hh"
class OutdrvUnit;
class AmpUnit;
diff --git a/src/mem/ruby/network/orion/Buffer/WordlineUnit.cc b/src/mem/ruby/network/orion/Buffer/WordlineUnit.cc
index 3f2cdc34b..f56dc0631 100644
--- a/src/mem/ruby/network/orion/Buffer/WordlineUnit.cc
+++ b/src/mem/ruby/network/orion/Buffer/WordlineUnit.cc
@@ -34,8 +34,8 @@
*/
#include "base/misc.hh"
-#include "mem/ruby/network/orion/Buffer/WordlineUnit.hh"
#include "mem/ruby/network/orion/Buffer/SRAM.hh"
+#include "mem/ruby/network/orion/Buffer/WordlineUnit.hh"
#include "mem/ruby/network/orion/TechParameter.hh"
WordlineUnit::WordlineUnit(
diff --git a/src/mem/ruby/network/orion/Clock.cc b/src/mem/ruby/network/orion/Clock.cc
index 27c6e2332..303469e0c 100644
--- a/src/mem/ruby/network/orion/Clock.cc
+++ b/src/mem/ruby/network/orion/Clock.cc
@@ -34,8 +34,8 @@
*/
#include "mem/ruby/network/orion/Clock.hh"
-#include "mem/ruby/network/orion/TechParameter.hh"
#include "mem/ruby/network/orion/OrionConfig.hh"
+#include "mem/ruby/network/orion/TechParameter.hh"
#include "mem/ruby/network/orion/Wire.hh"
Clock::Clock(
diff --git a/src/mem/ruby/network/orion/ConfigFile.hh b/src/mem/ruby/network/orion/ConfigFile.hh
index 65cf50069..b159bba8c 100644
--- a/src/mem/ruby/network/orion/ConfigFile.hh
+++ b/src/mem/ruby/network/orion/ConfigFile.hh
@@ -42,11 +42,11 @@
#ifndef CONFIGFILE_H
#define CONFIGFILE_H
-#include <string>
-#include <map>
-#include <iostream>
#include <fstream>
+#include <iostream>
+#include <map>
#include <sstream>
+#include <string>
using std::string;
diff --git a/src/mem/ruby/network/orion/Crossbar/Crossbar.cc b/src/mem/ruby/network/orion/Crossbar/Crossbar.cc
index 65f1c20f9..7bb29a5c7 100644
--- a/src/mem/ruby/network/orion/Crossbar/Crossbar.cc
+++ b/src/mem/ruby/network/orion/Crossbar/Crossbar.cc
@@ -33,14 +33,14 @@
* Kambiz Samadi (Orion 2.0, UC San Diego)
*/
-#include <iostream>
#include <cassert>
+#include <iostream>
#include "mem/ruby/network/orion/Crossbar/Crossbar.hh"
-#include "mem/ruby/network/orion/TechParameter.hh"
-#include "mem/ruby/network/orion/OrionConfig.hh"
#include "mem/ruby/network/orion/Crossbar/MatrixCrossbar.hh"
#include "mem/ruby/network/orion/Crossbar/MultreeCrossbar.hh"
+#include "mem/ruby/network/orion/OrionConfig.hh"
+#include "mem/ruby/network/orion/TechParameter.hh"
using namespace std;
diff --git a/src/mem/ruby/network/orion/Crossbar/MatrixCrossbar.cc b/src/mem/ruby/network/orion/Crossbar/MatrixCrossbar.cc
index f283f6176..3e379bac2 100644
--- a/src/mem/ruby/network/orion/Crossbar/MatrixCrossbar.cc
+++ b/src/mem/ruby/network/orion/Crossbar/MatrixCrossbar.cc
@@ -33,8 +33,8 @@
* Kambiz Samadi (Orion 2.0, UC San Diego)
*/
-#include <iostream>
#include <cassert>
+#include <iostream>
#include "mem/ruby/network/orion/Crossbar/MatrixCrossbar.hh"
#include "mem/ruby/network/orion/TechParameter.hh"
diff --git a/src/mem/ruby/network/orion/Crossbar/MatrixCrossbar.hh b/src/mem/ruby/network/orion/Crossbar/MatrixCrossbar.hh
index cbfcf9fc7..af08834ac 100644
--- a/src/mem/ruby/network/orion/Crossbar/MatrixCrossbar.hh
+++ b/src/mem/ruby/network/orion/Crossbar/MatrixCrossbar.hh
@@ -36,8 +36,8 @@
#ifndef __MATRIXCROSSBAR_H__
#define __MATRIXCROSSBAR_H__
-#include "mem/ruby/network/orion/Type.hh"
#include "mem/ruby/network/orion/Crossbar/Crossbar.hh"
+#include "mem/ruby/network/orion/Type.hh"
class TechParameter;
diff --git a/src/mem/ruby/network/orion/Crossbar/MultreeCrossbar.cc b/src/mem/ruby/network/orion/Crossbar/MultreeCrossbar.cc
index 44fa43cac..4c610ebaf 100644
--- a/src/mem/ruby/network/orion/Crossbar/MultreeCrossbar.cc
+++ b/src/mem/ruby/network/orion/Crossbar/MultreeCrossbar.cc
@@ -33,8 +33,8 @@
* Kambiz Samadi (Orion 2.0, UC San Diego)
*/
-#include <iostream>
#include <cmath>
+#include <iostream>
#include "mem/ruby/network/orion/Crossbar/MultreeCrossbar.hh"
#include "mem/ruby/network/orion/TechParameter.hh"
diff --git a/src/mem/ruby/network/orion/Crossbar/MultreeCrossbar.hh b/src/mem/ruby/network/orion/Crossbar/MultreeCrossbar.hh
index bac8b22cd..6a3395036 100644
--- a/src/mem/ruby/network/orion/Crossbar/MultreeCrossbar.hh
+++ b/src/mem/ruby/network/orion/Crossbar/MultreeCrossbar.hh
@@ -36,8 +36,8 @@
#ifndef __MULTREECROSSBAR_H__
#define __MULTREECROSSBAR_H__
-#include "mem/ruby/network/orion/Type.hh"
#include "mem/ruby/network/orion/Crossbar/Crossbar.hh"
+#include "mem/ruby/network/orion/Type.hh"
class TechParameter;
diff --git a/src/mem/ruby/network/orion/FlipFlop.cc b/src/mem/ruby/network/orion/FlipFlop.cc
index 5b76d0a23..2b44b0fb4 100644
--- a/src/mem/ruby/network/orion/FlipFlop.cc
+++ b/src/mem/ruby/network/orion/FlipFlop.cc
@@ -33,8 +33,8 @@
* Kambiz Samadi (Orion 2.0, UC San Diego)
*/
-#include <iostream>
#include <cassert>
+#include <iostream>
#include "mem/ruby/network/orion/FlipFlop.hh"
#include "mem/ruby/network/orion/TechParameter.hh"
diff --git a/src/mem/ruby/network/orion/NetworkPower.cc b/src/mem/ruby/network/orion/NetworkPower.cc
index a28b8fd07..81d611f63 100644
--- a/src/mem/ruby/network/orion/NetworkPower.cc
+++ b/src/mem/ruby/network/orion/NetworkPower.cc
@@ -31,8 +31,8 @@
#include "mem/ruby/network/orion/NetworkPower.hh"
#include "mem/ruby/network/orion/OrionConfig.hh"
-#include "mem/ruby/network/orion/OrionRouter.hh"
#include "mem/ruby/network/orion/OrionLink.hh"
+#include "mem/ruby/network/orion/OrionRouter.hh"
double
Router_d::calculate_power()
diff --git a/src/mem/ruby/network/orion/NetworkPower.hh b/src/mem/ruby/network/orion/NetworkPower.hh
index 591f45362..eee7d03bc 100644
--- a/src/mem/ruby/network/orion/NetworkPower.hh
+++ b/src/mem/ruby/network/orion/NetworkPower.hh
@@ -32,12 +32,12 @@
#ifndef POWER_TRACE_H
#define POWER_TRACE_H
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
+#include <cassert>
+#include <cstdio>
+#include <cstdlib>
-#include "mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh"
+#include "mem/ruby/network/garnet/fixed-pipeline/NetworkLink_d.hh"
#include "mem/ruby/network/garnet/fixed-pipeline/Router_d.hh"
//int RW :
diff --git a/src/mem/ruby/network/orion/OrionConfig.cc b/src/mem/ruby/network/orion/OrionConfig.cc
index a4ac55a36..ca30bca3b 100644
--- a/src/mem/ruby/network/orion/OrionConfig.cc
+++ b/src/mem/ruby/network/orion/OrionConfig.cc
@@ -31,8 +31,8 @@
#include <iostream>
#include <string>
-#include "mem/ruby/network/orion/OrionConfig.hh"
#include "mem/ruby/network/orion/ConfigFile.hh"
+#include "mem/ruby/network/orion/OrionConfig.hh"
#include "mem/ruby/network/orion/TechParameter.hh"
using namespace std;
diff --git a/src/mem/ruby/network/orion/OrionConfig.hh b/src/mem/ruby/network/orion/OrionConfig.hh
index 78131e3c5..7138fd8a2 100644
--- a/src/mem/ruby/network/orion/OrionConfig.hh
+++ b/src/mem/ruby/network/orion/OrionConfig.hh
@@ -32,8 +32,8 @@
#define __ORIONCONFIG_H__
#include <iostream>
-#include <sstream>
#include <map>
+#include <sstream>
#include "mem/ruby/network/orion/Type.hh"
diff --git a/src/mem/ruby/network/orion/OrionLink.cc b/src/mem/ruby/network/orion/OrionLink.cc
index 38ddd0459..c10552d7a 100644
--- a/src/mem/ruby/network/orion/OrionLink.cc
+++ b/src/mem/ruby/network/orion/OrionLink.cc
@@ -33,11 +33,11 @@
* Kambiz Samadi (Orion 2.0, UC San Diego)
*/
-#include <iostream>
#include <cassert>
+#include <iostream>
-#include "mem/ruby/network/orion/OrionLink.hh"
#include "mem/ruby/network/orion/OrionConfig.hh"
+#include "mem/ruby/network/orion/OrionLink.hh"
#include "mem/ruby/network/orion/Wire.hh"
using namespace std;
diff --git a/src/mem/ruby/network/orion/OrionRouter.cc b/src/mem/ruby/network/orion/OrionRouter.cc
index 1dd92d885..579114f3d 100644
--- a/src/mem/ruby/network/orion/OrionRouter.cc
+++ b/src/mem/ruby/network/orion/OrionRouter.cc
@@ -35,13 +35,13 @@
#include <cassert>
-#include "OrionRouter.hh"
-#include "mem/ruby/network/orion/OrionConfig.hh"
+#include "mem/ruby/network/orion/Allocator/SWAllocator.hh"
+#include "mem/ruby/network/orion/Allocator/VCAllocator.hh"
#include "mem/ruby/network/orion/Buffer/Buffer.hh"
#include "mem/ruby/network/orion/Crossbar/Crossbar.hh"
-#include "mem/ruby/network/orion/Allocator/VCAllocator.hh"
-#include "mem/ruby/network/orion/Allocator/SWAllocator.hh"
#include "mem/ruby/network/orion/Clock.hh"
+#include "mem/ruby/network/orion/OrionConfig.hh"
+#include "OrionRouter.hh"
OrionRouter::OrionRouter(
uint32_t num_in_port_,
diff --git a/src/mem/ruby/network/orion/TechParameter.cc b/src/mem/ruby/network/orion/TechParameter.cc
index d1a107e18..5147eaec1 100644
--- a/src/mem/ruby/network/orion/TechParameter.cc
+++ b/src/mem/ruby/network/orion/TechParameter.cc
@@ -33,13 +33,13 @@
* Kambiz Samadi (Orion 2.0, UC San Diego)
*/
-#include <iostream>
-#include <string>
#include <cmath>
#include <cstdlib>
+#include <iostream>
+#include <string>
-#include "mem/ruby/network/orion/TechParameter.hh"
#include "mem/ruby/network/orion/OrionConfig.hh"
+#include "mem/ruby/network/orion/TechParameter.hh"
using namespace std;
diff --git a/src/mem/ruby/network/orion/Wire.cc b/src/mem/ruby/network/orion/Wire.cc
index c704fa8da..d7333dd19 100644
--- a/src/mem/ruby/network/orion/Wire.cc
+++ b/src/mem/ruby/network/orion/Wire.cc
@@ -33,13 +33,13 @@
* Kambiz Samadi (Orion 2.0, UC San Diego)
*/
-#include <iostream>
#include <cmath>
#include <cstdlib>
+#include <iostream>
#include "base/misc.hh"
-#include "mem/ruby/network/orion/Wire.hh"
#include "mem/ruby/network/orion/TechParameter.hh"
+#include "mem/ruby/network/orion/Wire.hh"
using namespace std;
diff --git a/src/mem/ruby/network/orion/orion.hh b/src/mem/ruby/network/orion/orion.hh
index a9cc2a5b6..215398583 100644
--- a/src/mem/ruby/network/orion/orion.hh
+++ b/src/mem/ruby/network/orion/orion.hh
@@ -32,8 +32,8 @@
#define __ORION_H__
#include "mem/ruby/network/orion/OrionConfig.hh"
-#include "mem/ruby/network/orion/OrionRouter.hh"
#include "mem/ruby/network/orion/OrionLink.hh"
+#include "mem/ruby/network/orion/OrionRouter.hh"
#endif
diff --git a/src/mem/ruby/network/simple/PerfectSwitch.hh b/src/mem/ruby/network/simple/PerfectSwitch.hh
index 41125083f..15abec020 100644
--- a/src/mem/ruby/network/simple/PerfectSwitch.hh
+++ b/src/mem/ruby/network/simple/PerfectSwitch.hh
@@ -37,8 +37,8 @@
#define __MEM_RUBY_NETWORK_SIMPLE_PERFECTSWITCH_HH__
#include <iostream>
-#include <vector>
#include <string>
+#include <vector>
#include "mem/ruby/common/Consumer.hh"
#include "mem/ruby/common/Global.hh"
diff --git a/src/mem/ruby/network/simple/Switch.cc b/src/mem/ruby/network/simple/Switch.cc
index 3439bf44b..391e08724 100644
--- a/src/mem/ruby/network/simple/Switch.cc
+++ b/src/mem/ruby/network/simple/Switch.cc
@@ -32,10 +32,10 @@
#include "mem/protocol/MessageSizeType.hh"
#include "mem/protocol/Protocol.hh"
#include "mem/ruby/buffers/MessageBuffer.hh"
-#include "mem/ruby/network/Network.hh"
#include "mem/ruby/network/simple/PerfectSwitch.hh"
#include "mem/ruby/network/simple/Switch.hh"
#include "mem/ruby/network/simple/Throttle.hh"
+#include "mem/ruby/network/Network.hh"
using namespace std;
using m5::stl_helpers::deletePointers;
diff --git a/src/mem/ruby/network/simple/Throttle.cc b/src/mem/ruby/network/simple/Throttle.cc
index 28638cca9..0274a9771 100644
--- a/src/mem/ruby/network/simple/Throttle.cc
+++ b/src/mem/ruby/network/simple/Throttle.cc
@@ -31,8 +31,8 @@
#include "base/cprintf.hh"
#include "mem/protocol/Protocol.hh"
#include "mem/ruby/buffers/MessageBuffer.hh"
-#include "mem/ruby/network/Network.hh"
#include "mem/ruby/network/simple/Throttle.hh"
+#include "mem/ruby/network/Network.hh"
#include "mem/ruby/slicc_interface/NetworkMessage.hh"
#include "mem/ruby/system/System.hh"
diff --git a/src/mem/ruby/network/simple/Throttle.hh b/src/mem/ruby/network/simple/Throttle.hh
index b4e6c867e..0a1fc9a30 100644
--- a/src/mem/ruby/network/simple/Throttle.hh
+++ b/src/mem/ruby/network/simple/Throttle.hh
@@ -39,8 +39,8 @@
#define __MEM_RUBY_NETWORK_SIMPLE_THROTTLE_HH__
#include <iostream>
-#include <vector>
#include <string>
+#include <vector>
#include "mem/ruby/common/Consumer.hh"
#include "mem/ruby/common/Global.hh"
diff --git a/src/mem/ruby/network/simple/Topology.cc b/src/mem/ruby/network/simple/Topology.cc
index d79491ef2..a06c1578d 100644
--- a/src/mem/ruby/network/simple/Topology.cc
+++ b/src/mem/ruby/network/simple/Topology.cc
@@ -32,8 +32,8 @@
#include "mem/protocol/Protocol.hh"
#include "mem/protocol/TopologyType.hh"
#include "mem/ruby/common/NetDest.hh"
-#include "mem/ruby/network/Network.hh"
#include "mem/ruby/network/simple/Topology.hh"
+#include "mem/ruby/network/Network.hh"
#include "mem/ruby/slicc_interface/AbstractController.hh"
#include "mem/ruby/system/System.hh"
diff --git a/src/mem/ruby/profiler/CacheProfiler.hh b/src/mem/ruby/profiler/CacheProfiler.hh
index 1ae6ba7a8..33cb45e85 100644
--- a/src/mem/ruby/profiler/CacheProfiler.hh
+++ b/src/mem/ruby/profiler/CacheProfiler.hh
@@ -33,10 +33,10 @@
#include <string>
#include <vector>
-#include "mem/protocol/RubyAccessMode.hh"
-#include "mem/protocol/RubyRequestType.hh"
#include "mem/protocol/GenericRequestType.hh"
#include "mem/protocol/PrefetchBit.hh"
+#include "mem/protocol/RubyAccessMode.hh"
+#include "mem/protocol/RubyRequestType.hh"
#include "mem/ruby/common/Global.hh"
#include "mem/ruby/common/Histogram.hh"
#include "mem/ruby/system/NodeID.hh"
diff --git a/src/mem/ruby/profiler/Profiler.cc b/src/mem/ruby/profiler/Profiler.cc
index ed7c25c9d..afb77f09f 100644
--- a/src/mem/ruby/profiler/Profiler.cc
+++ b/src/mem/ruby/profiler/Profiler.cc
@@ -51,14 +51,13 @@
#include "base/stl_helpers.hh"
#include "base/str.hh"
-#include "mem/protocol/RubyRequest.hh"
#include "mem/protocol/MachineType.hh"
#include "mem/protocol/Protocol.hh"
+#include "mem/protocol/RubyRequest.hh"
#include "mem/ruby/network/Network.hh"
#include "mem/ruby/profiler/AddressProfiler.hh"
#include "mem/ruby/profiler/Profiler.hh"
#include "mem/ruby/system/System.hh"
-#include "mem/ruby/system/System.hh"
using namespace std;
using m5::stl_helpers::operator<<;
diff --git a/src/mem/ruby/profiler/Profiler.hh b/src/mem/ruby/profiler/Profiler.hh
index 352ba453f..9efaf4be1 100644
--- a/src/mem/ruby/profiler/Profiler.hh
+++ b/src/mem/ruby/profiler/Profiler.hh
@@ -51,12 +51,12 @@
#include <vector>
#include "base/hashmap.hh"
-#include "mem/protocol/RubyAccessMode.hh"
#include "mem/protocol/AccessType.hh"
-#include "mem/protocol/RubyRequestType.hh"
#include "mem/protocol/GenericMachineType.hh"
#include "mem/protocol/GenericRequestType.hh"
#include "mem/protocol/PrefetchBit.hh"
+#include "mem/protocol/RubyAccessMode.hh"
+#include "mem/protocol/RubyRequestType.hh"
#include "mem/ruby/common/Address.hh"
#include "mem/ruby/common/Consumer.hh"
#include "mem/ruby/common/Global.hh"
diff --git a/src/mem/ruby/recorder/CacheRecorder.cc b/src/mem/ruby/recorder/CacheRecorder.cc
index 1d08eef12..fc6ad0975 100644
--- a/src/mem/ruby/recorder/CacheRecorder.cc
+++ b/src/mem/ruby/recorder/CacheRecorder.cc
@@ -28,10 +28,9 @@
#include <algorithm>
-#include "gzstream.hh"
-
#include "mem/ruby/eventqueue/RubyEventQueue.hh"
#include "mem/ruby/recorder/CacheRecorder.hh"
+#include "gzstream.hh"
using namespace std;
diff --git a/src/mem/ruby/recorder/CacheRecorder.hh b/src/mem/ruby/recorder/CacheRecorder.hh
index 1aac9a7e2..97a20af28 100644
--- a/src/mem/ruby/recorder/CacheRecorder.hh
+++ b/src/mem/ruby/recorder/CacheRecorder.hh
@@ -40,8 +40,8 @@
#include "mem/protocol/RubyRequestType.hh"
#include "mem/ruby/common/Global.hh"
-#include "mem/ruby/system/NodeID.hh"
#include "mem/ruby/recorder/TraceRecord.hh"
+#include "mem/ruby/system/NodeID.hh"
class Address;
class TraceRecord;
diff --git a/src/mem/ruby/recorder/Tracer.hh b/src/mem/ruby/recorder/Tracer.hh
index 39bab72a1..e050b3812 100644
--- a/src/mem/ruby/recorder/Tracer.hh
+++ b/src/mem/ruby/recorder/Tracer.hh
@@ -37,13 +37,12 @@
#include <iostream>
#include <string>
-#include "gzstream.hh"
-
#include "mem/protocol/RubyRequestType.hh"
#include "mem/ruby/common/Global.hh"
#include "mem/ruby/system/NodeID.hh"
#include "params/RubyTracer.hh"
#include "sim/sim_object.hh"
+#include "gzstream.hh"
class Address;
class TraceRecord;
diff --git a/src/mem/ruby/slicc_interface/AbstractEntry.hh b/src/mem/ruby/slicc_interface/AbstractEntry.hh
index 6752bf6c4..7076d2e4c 100644
--- a/src/mem/ruby/slicc_interface/AbstractEntry.hh
+++ b/src/mem/ruby/slicc_interface/AbstractEntry.hh
@@ -31,9 +31,9 @@
#include <iostream>
+#include "mem/protocol/AccessPermission.hh"
#include "mem/ruby/common/Address.hh"
#include "mem/ruby/common/Global.hh"
-#include "mem/protocol/AccessPermission.hh"
class DataBlock;
diff --git a/src/mem/ruby/slicc_interface/RubyRequest.hh b/src/mem/ruby/slicc_interface/RubyRequest.hh
index 8ac43a8e1..0e7ab039d 100644
--- a/src/mem/ruby/slicc_interface/RubyRequest.hh
+++ b/src/mem/ruby/slicc_interface/RubyRequest.hh
@@ -31,12 +31,12 @@
#include <ostream>
-#include "mem/packet.hh"
-#include "mem/protocol/RubyAccessMode.hh"
-#include "mem/protocol/RubyRequestType.hh"
#include "mem/protocol/Message.hh"
#include "mem/protocol/PrefetchBit.hh"
+#include "mem/protocol/RubyAccessMode.hh"
+#include "mem/protocol/RubyRequestType.hh"
#include "mem/ruby/common/Address.hh"
+#include "mem/packet.hh"
typedef void* RubyPortHandle;
diff --git a/src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.cc b/src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.cc
index 79b9821ba..06c036a10 100644
--- a/src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.cc
+++ b/src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.cc
@@ -28,5 +28,3 @@
#include "mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh"
#include "mem/ruby/system/CacheMemory.hh"
-
-
diff --git a/src/mem/ruby/slicc_interface/RubySlicc_includes.hh b/src/mem/ruby/slicc_interface/RubySlicc_includes.hh
index ae98b3084..6defbbaa8 100644
--- a/src/mem/ruby/slicc_interface/RubySlicc_includes.hh
+++ b/src/mem/ruby/slicc_interface/RubySlicc_includes.hh
@@ -30,8 +30,8 @@
#define __MEM_RUBY_SLICC_INTERFACE_RUBYSLICC_INCLUDES_HH__
#include "mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh"
-#include "mem/ruby/slicc_interface/RubySlicc_Util.hh"
#include "mem/ruby/slicc_interface/RubySlicc_Profiler_interface.hh"
+#include "mem/ruby/slicc_interface/RubySlicc_Util.hh"
#endif // __MEM_RUBY_SLICC_INTERFACE_RUBYSLICC_INCLUDES_HH__
diff --git a/src/mem/ruby/system/CacheMemory.hh b/src/mem/ruby/system/CacheMemory.hh
index e2e9a429e..4e4206e8d 100644
--- a/src/mem/ruby/system/CacheMemory.hh
+++ b/src/mem/ruby/system/CacheMemory.hh
@@ -35,10 +35,10 @@
#include "base/hashmap.hh"
#include "mem/protocol/AccessPermission.hh"
-#include "mem/protocol/RubyRequest.hh"
-#include "mem/protocol/RubyRequestType.hh"
#include "mem/protocol/GenericRequestType.hh"
#include "mem/protocol/MachineType.hh"
+#include "mem/protocol/RubyRequest.hh"
+#include "mem/protocol/RubyRequestType.hh"
#include "mem/ruby/common/Address.hh"
#include "mem/ruby/common/DataBlock.hh"
#include "mem/ruby/common/Global.hh"
diff --git a/src/mem/ruby/system/RubyPort.cc b/src/mem/ruby/system/RubyPort.cc
index 6d5cb71bf..354634358 100644
--- a/src/mem/ruby/system/RubyPort.cc
+++ b/src/mem/ruby/system/RubyPort.cc
@@ -31,9 +31,9 @@
#include "arch/x86/insts/microldstop.hh"
#endif // X86_ISA
#include "cpu/testers/rubytest/RubyTester.hh"
-#include "mem/physical.hh"
#include "mem/ruby/slicc_interface/AbstractController.hh"
#include "mem/ruby/system/RubyPort.hh"
+#include "mem/physical.hh"
RubyPort::RubyPort(const Params *p)
: MemObject(p)
diff --git a/src/mem/ruby/system/RubyPort.hh b/src/mem/ruby/system/RubyPort.hh
index 82ddc682a..dc7a141c3 100644
--- a/src/mem/ruby/system/RubyPort.hh
+++ b/src/mem/ruby/system/RubyPort.hh
@@ -32,11 +32,11 @@
#include <cassert>
#include <string>
-#include "mem/mem_object.hh"
-#include "mem/physical.hh"
#include "mem/protocol/RequestStatus.hh"
#include "mem/ruby/slicc_interface/RubyRequest.hh"
#include "mem/ruby/system/System.hh"
+#include "mem/mem_object.hh"
+#include "mem/physical.hh"
#include "mem/tport.hh"
#include "params/RubyPort.hh"
diff --git a/src/mem/ruby/system/Sequencer.cc b/src/mem/ruby/system/Sequencer.cc
index 0d8120330..db30b179f 100644
--- a/src/mem/ruby/system/Sequencer.cc
+++ b/src/mem/ruby/system/Sequencer.cc
@@ -26,18 +26,17 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "base/str.hh"
#include "base/misc.hh"
+#include "base/str.hh"
#include "cpu/testers/rubytest/RubyTester.hh"
#include "mem/protocol/Protocol.hh"
-#include "mem/protocol/Protocol.hh"
#include "mem/ruby/buffers/MessageBuffer.hh"
#include "mem/ruby/common/Global.hh"
#include "mem/ruby/common/SubBlock.hh"
-#include "mem/ruby/slicc_interface/RubyRequest.hh"
#include "mem/ruby/profiler/Profiler.hh"
#include "mem/ruby/recorder/Tracer.hh"
#include "mem/ruby/slicc_interface/AbstractController.hh"
+#include "mem/ruby/slicc_interface/RubyRequest.hh"
#include "mem/ruby/system/CacheMemory.hh"
#include "mem/ruby/system/Sequencer.hh"
#include "mem/ruby/system/System.hh"
diff --git a/src/mem/ruby/system/Sequencer.hh b/src/mem/ruby/system/Sequencer.hh
index ff3a0d5b1..885910251 100644
--- a/src/mem/ruby/system/Sequencer.hh
+++ b/src/mem/ruby/system/Sequencer.hh
@@ -32,10 +32,10 @@
#include <iostream>
#include "base/hashmap.hh"
-#include "mem/protocol/RubyAccessMode.hh"
-#include "mem/protocol/RubyRequestType.hh"
#include "mem/protocol/GenericMachineType.hh"
#include "mem/protocol/PrefetchBit.hh"
+#include "mem/protocol/RubyAccessMode.hh"
+#include "mem/protocol/RubyRequestType.hh"
#include "mem/ruby/common/Address.hh"
#include "mem/ruby/common/Consumer.hh"
#include "mem/ruby/common/Global.hh"
diff --git a/src/mem/ruby/system/WireBuffer.hh b/src/mem/ruby/system/WireBuffer.hh
index b34488fb1..648019aeb 100644
--- a/src/mem/ruby/system/WireBuffer.hh
+++ b/src/mem/ruby/system/WireBuffer.hh
@@ -33,8 +33,8 @@
#define __MEM_RUBY_SYSTEM_WIREBUFFER_HH__
#include <iostream>
-#include <vector>
#include <string>
+#include <vector>
#include "mem/ruby/buffers/MessageBufferNode.hh"
#include "mem/ruby/common/Global.hh"
@@ -42,7 +42,6 @@
#include "params/RubyWireBuffer.hh"
#include "sim/sim_object.hh"
-
//////////////////////////////////////////////////////////////////////////////
// This object was written to literally mimic a Wire in Ruby, in the sense
// that there is no way for messages to get reordered en route on the WireBuffer.
diff --git a/src/mem/slicc/symbols/StateMachine.py b/src/mem/slicc/symbols/StateMachine.py
index 90b7bfbd8..d1be10769 100644
--- a/src/mem/slicc/symbols/StateMachine.py
+++ b/src/mem/slicc/symbols/StateMachine.py
@@ -222,15 +222,14 @@ class $py_ident(RubyController):
#include <sstream>
#include <string>
-#include "params/$c_ident.hh"
-
-#include "mem/ruby/common/Global.hh"
-#include "mem/ruby/common/Consumer.hh"
-#include "mem/ruby/slicc_interface/AbstractController.hh"
+#include "mem/protocol/${ident}_ProfileDumper.hh"
+#include "mem/protocol/${ident}_Profiler.hh"
#include "mem/protocol/TransitionResult.hh"
#include "mem/protocol/Types.hh"
-#include "mem/protocol/${ident}_Profiler.hh"
-#include "mem/protocol/${ident}_ProfileDumper.hh"
+#include "mem/ruby/common/Consumer.hh"
+#include "mem/ruby/common/Global.hh"
+#include "mem/ruby/slicc_interface/AbstractController.hh"
+#include "params/$c_ident.hh"
''')
seen_types = set()
@@ -419,8 +418,8 @@ void unset_tbe(${{self.TBEType.c_ident}}*& m_tbe_ptr);
#include "base/cprintf.hh"
#include "mem/protocol/${ident}_Controller.hh"
-#include "mem/protocol/${ident}_State.hh"
#include "mem/protocol/${ident}_Event.hh"
+#include "mem/protocol/${ident}_State.hh"
#include "mem/protocol/Types.hh"
#include "mem/ruby/common/Global.hh"
#include "mem/ruby/slicc_interface/RubySlicc_includes.hh"
@@ -969,12 +968,12 @@ $c_ident::${{action.ident}}(const Address& addr)
#include <cassert>
#include "base/misc.hh"
-#include "mem/ruby/common/Global.hh"
-#include "mem/ruby/slicc_interface/RubySlicc_includes.hh"
#include "mem/protocol/${ident}_Controller.hh"
-#include "mem/protocol/${ident}_State.hh"
#include "mem/protocol/${ident}_Event.hh"
+#include "mem/protocol/${ident}_State.hh"
#include "mem/protocol/Types.hh"
+#include "mem/ruby/common/Global.hh"
+#include "mem/ruby/slicc_interface/RubySlicc_includes.hh"
#include "mem/ruby/system/System.hh"
using namespace std;
@@ -1038,11 +1037,11 @@ ${ident}_Controller::wakeup()
#include "base/misc.hh"
#include "base/trace.hh"
-#include "mem/ruby/common/Global.hh"
#include "mem/protocol/${ident}_Controller.hh"
-#include "mem/protocol/${ident}_State.hh"
#include "mem/protocol/${ident}_Event.hh"
+#include "mem/protocol/${ident}_State.hh"
#include "mem/protocol/Types.hh"
+#include "mem/ruby/common/Global.hh"
#include "mem/ruby/system/System.hh"
#define HASH_FUN(state, event) ((int(state)*${ident}_Event_NUM)+int(event))
@@ -1261,8 +1260,8 @@ if (!%s.areNSlotsAvailable(%s))
#include <iostream>
#include <vector>
-#include "${ident}_Profiler.hh"
#include "${ident}_Event.hh"
+#include "${ident}_Profiler.hh"
typedef std::vector<${ident}_Profiler *> ${ident}_profilers;
@@ -1356,9 +1355,9 @@ ${ident}_ProfileDumper::dumpStats(std::ostream& out) const
#include <cassert>
#include <iostream>
-#include "mem/ruby/common/Global.hh"
-#include "mem/protocol/${ident}_State.hh"
#include "mem/protocol/${ident}_Event.hh"
+#include "mem/protocol/${ident}_State.hh"
+#include "mem/ruby/common/Global.hh"
class ${ident}_Profiler
{
diff --git a/src/mem/tport.hh b/src/mem/tport.hh
index 91a8ab9a5..f081d8656 100644
--- a/src/mem/tport.hh
+++ b/src/mem/tport.hh
@@ -37,11 +37,12 @@
* Declaration of SimpleTimingPort.
*/
-#include "mem/port.hh"
-#include "sim/eventq.hh"
#include <list>
#include <string>
+#include "mem/port.hh"
+#include "sim/eventq.hh"
+
/**
* A simple port for interfacing objects that basically have only
* functional memory behavior (e.g. I/O devices) to the memory system.
diff --git a/src/mem/translating_port.cc b/src/mem/translating_port.cc
index 700229b23..210f9beb3 100644
--- a/src/mem/translating_port.cc
+++ b/src/mem/translating_port.cc
@@ -33,9 +33,9 @@
#include "base/chunk_generator.hh"
#include "config/the_isa.hh"
+#include "mem/page_table.hh"
#include "mem/port.hh"
#include "mem/translating_port.hh"
-#include "mem/page_table.hh"
#include "sim/process.hh"
using namespace TheISA;
diff --git a/src/mem/vport.hh b/src/mem/vport.hh
index a8ceaa9fc..1dfc0ea23 100644
--- a/src/mem/vport.hh
+++ b/src/mem/vport.hh
@@ -38,10 +38,9 @@
#ifndef __MEM_VPORT_HH__
#define __MEM_VPORT_HH__
-#include "mem/port_impl.hh"
-#include "config/full_system.hh"
#include "arch/vtophys.hh"
-
+#include "config/full_system.hh"
+#include "mem/port_impl.hh"
/** A class that translates a virtual address to a physical address and then
* calls the above read/write functions. If a thread context is provided the
diff --git a/src/python/swig/core.i b/src/python/swig/core.i
index ffaf84476..ed520e17a 100644
--- a/src/python/swig/core.i
+++ b/src/python/swig/core.i
@@ -32,12 +32,11 @@
%module(package="m5.internal") core
%{
-#include "python/swig/pyobject.hh"
-
#include "base/misc.hh"
#include "base/random.hh"
#include "base/socket.hh"
#include "base/types.hh"
+#include "python/swig/pyobject.hh"
#include "sim/core.hh"
extern const char *compileDate;
@@ -64,8 +63,8 @@ seedRandom(uint64_t seed)
%}
-%include <stdint.i>
%include <std_string.i>
+%include <stdint.i>
%include "base/types.hh"
diff --git a/src/python/swig/event.i b/src/python/swig/event.i
index 1ea20dc81..0aae6bd0a 100644
--- a/src/python/swig/event.i
+++ b/src/python/swig/event.i
@@ -70,15 +70,15 @@
%ignore EventQueue::schedule;
%ignore EventQueue::deschedule;
+%include <std_string.i>
+%include <stdint.i>
+
%import "base/fast_alloc.hh"
%import "sim/serialize.hh"
-%include <stdint.i>
-%include <std_string.i>
-
%include "base/types.hh"
-%include "sim/eventq.hh"
%include "python/swig/pyevent.hh"
+%include "sim/eventq.hh"
struct CountedDrainEvent : public Event
{
diff --git a/src/python/swig/inet.i b/src/python/swig/inet.i
index ebe264484..144b3dbac 100644
--- a/src/python/swig/inet.i
+++ b/src/python/swig/inet.i
@@ -34,8 +34,8 @@
#include "base/inet.hh"
%}
-%import <stdint.i>
%import <std_string.i>
+%import <stdint.i>
namespace Net {
struct EthAddr
diff --git a/src/python/swig/pyobject.cc b/src/python/swig/pyobject.cc
index eaa8baa8b..7847a6f3a 100644
--- a/src/python/swig/pyobject.cc
+++ b/src/python/swig/pyobject.cc
@@ -41,8 +41,8 @@
#if FULL_SYSTEM
#include "dev/etherdevice.hh"
-#include "dev/etherobject.hh"
#include "dev/etherint.hh"
+#include "dev/etherobject.hh"
#endif
using namespace std;
diff --git a/src/python/swig/sim_object.i b/src/python/swig/sim_object.i
index 7957182a1..06f683aa1 100644
--- a/src/python/swig/sim_object.i
+++ b/src/python/swig/sim_object.i
@@ -33,8 +33,8 @@
%}
// import these files for SWIG to wrap
-%include <stdint.i>
%include <std_string.i>
+%include <stdint.i>
%include "base/types.hh"
%include "sim/sim_object_params.hh"
diff --git a/src/python/swig/stats.i b/src/python/swig/stats.i
index 1f1130937..72172ae94 100644
--- a/src/python/swig/stats.i
+++ b/src/python/swig/stats.i
@@ -34,14 +34,15 @@
%include <std_string.i>
%{
-#include "base/statistics.hh"
#include "base/stats/mysql.hh"
#include "base/stats/text.hh"
+#include "base/statistics.hh"
#include "sim/core.hh"
#include "sim/stat_control.hh"
%}
%import "base/stats/types.hh"
+
%include "base/stats/info.hh"
namespace Stats {
diff --git a/src/python/swig/system.i b/src/python/swig/system.i
index 5e36b4ac5..1aadcecc6 100644
--- a/src/python/swig/system.i
+++ b/src/python/swig/system.i
@@ -32,8 +32,8 @@
#include "sim/system.hh"
%}
-%import "python/swig/sim_object.i"
%import "enums/MemoryMode.hh"
+%import "python/swig/sim_object.i"
class System : public SimObject
{
diff --git a/src/sim/faults.cc b/src/sim/faults.cc
index fbe8fb32a..adf6b2466 100644
--- a/src/sim/faults.cc
+++ b/src/sim/faults.cc
@@ -31,11 +31,11 @@
#include "arch/isa_traits.hh"
#include "base/misc.hh"
-#include "cpu/thread_context.hh"
#include "cpu/base.hh"
+#include "cpu/thread_context.hh"
+#include "mem/page_table.hh"
#include "sim/faults.hh"
#include "sim/process.hh"
-#include "mem/page_table.hh"
#if !FULL_SYSTEM
void FaultBase::invoke(ThreadContext * tc, StaticInstPtr inst)
diff --git a/src/sim/faults.hh b/src/sim/faults.hh
index 779e34c8f..7f431b313 100644
--- a/src/sim/faults.hh
+++ b/src/sim/faults.hh
@@ -34,10 +34,10 @@
#include "base/refcnt.hh"
#include "base/types.hh"
-#include "sim/fault_fwd.hh"
-#include "sim/stats.hh"
#include "config/full_system.hh"
#include "cpu/static_inst.hh"
+#include "sim/fault_fwd.hh"
+#include "sim/stats.hh"
class ThreadContext;
diff --git a/src/sim/init.cc b/src/sim/init.cc
index a9aa905ee..4c795eac4 100644
--- a/src/sim/init.cc
+++ b/src/sim/init.cc
@@ -30,13 +30,14 @@
*/
#include <Python.h>
+
#include <marshal.h>
-#include <signal.h>
+#include <zlib.h>
-#include <list>
+#include <csignal>
#include <iostream>
+#include <list>
#include <string>
-#include <zlib.h>
#include "base/cprintf.hh"
#include "base/misc.hh"
diff --git a/src/sim/process.cc b/src/sim/process.cc
index d4b1fba90..c0eebb371 100644
--- a/src/sim/process.cc
+++ b/src/sim/process.cc
@@ -30,15 +30,15 @@
* Ali Saidi
*/
-#include <unistd.h>
#include <fcntl.h>
+#include <unistd.h>
#include <cstdio>
#include <string>
-#include "base/intmath.hh"
#include "base/loader/object_file.hh"
#include "base/loader/symtab.hh"
+#include "base/intmath.hh"
#include "base/statistics.hh"
#include "config/full_system.hh"
#include "config/the_isa.hh"
@@ -46,8 +46,8 @@
#include "mem/page_table.hh"
#include "mem/physical.hh"
#include "mem/translating_port.hh"
-#include "params/Process.hh"
#include "params/LiveProcess.hh"
+#include "params/Process.hh"
#include "sim/debug.hh"
#include "sim/process.hh"
#include "sim/process_impl.hh"
diff --git a/src/sim/process_impl.hh b/src/sim/process_impl.hh
index 1db533428..b5333858c 100644
--- a/src/sim/process_impl.hh
+++ b/src/sim/process_impl.hh
@@ -47,7 +47,6 @@
#include "mem/translating_port.hh"
#include "sim/byteswap.hh"
-
//This needs to be templated for cases where 32 bit pointers are needed.
template<class AddrType>
void
diff --git a/src/sim/pseudo_inst.cc b/src/sim/pseudo_inst.cc
index bcff2f5c1..65dd7a1a1 100644
--- a/src/sim/pseudo_inst.cc
+++ b/src/sim/pseudo_inst.cc
@@ -40,10 +40,10 @@
* Authors: Nathan Binkert
*/
-#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
+#include <cerrno>
#include <fstream>
#include <string>
@@ -52,8 +52,8 @@
#include "config/full_system.hh"
#include "config/the_isa.hh"
#include "cpu/base.hh"
-#include "cpu/thread_context.hh"
#include "cpu/quiesce_event.hh"
+#include "cpu/thread_context.hh"
#include "params/BaseCPU.hh"
#include "sim/pseudo_inst.hh"
#include "sim/serialize.hh"
diff --git a/src/sim/serialize.cc b/src/sim/serialize.cc
index 44fe7b2e7..03f900837 100644
--- a/src/sim/serialize.cc
+++ b/src/sim/serialize.cc
@@ -30,11 +30,11 @@
* Steve Reinhardt
*/
+#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
+#include <cerrno>
#include <fstream>
#include <list>
#include <string>
diff --git a/src/sim/serialize.hh b/src/sim/serialize.hh
index 6be8ce3b6..12b787a5e 100644
--- a/src/sim/serialize.hh
+++ b/src/sim/serialize.hh
@@ -38,10 +38,10 @@
#define __SERIALIZE_HH__
-#include <list>
-#include <vector>
#include <iostream>
+#include <list>
#include <map>
+#include <vector>
#include "base/types.hh"
diff --git a/src/sim/stat_control.cc b/src/sim/stat_control.cc
index ad1d4a9e4..80aec224e 100644
--- a/src/sim/stat_control.cc
+++ b/src/sim/stat_control.cc
@@ -39,7 +39,6 @@
#include "base/hostinfo.hh"
#include "base/statistics.hh"
#include "base/time.hh"
-
#include "config/the_isa.hh"
#if THE_ISA == NO_ISA
#include "arch/noisa/cpu_dummy.hh"
diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc
index 506b22fdf..76fa8a239 100644
--- a/src/sim/syscall_emul.cc
+++ b/src/sim/syscall_emul.cc
@@ -37,16 +37,16 @@
#include <string>
#include "arch/utility.hh"
-#include "sim/syscall_emul.hh"
#include "base/chunk_generator.hh"
#include "base/trace.hh"
#include "config/the_isa.hh"
-#include "cpu/thread_context.hh"
#include "cpu/base.hh"
+#include "cpu/thread_context.hh"
#include "mem/page_table.hh"
#include "sim/process.hh"
-#include "sim/system.hh"
#include "sim/sim_exit.hh"
+#include "sim/syscall_emul.hh"
+#include "sim/system.hh"
using namespace std;
using namespace TheISA;
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index 5091c275d..06fadf516 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -45,11 +45,11 @@
#include <sys/fcntl.h> // for O_BINARY
#endif
#include <sys/stat.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/uio.h>
#include <sys/time.h>
+#include <sys/uio.h>
+#include <fcntl.h>
+#include <cerrno>
#include <string>
#include "base/chunk_generator.hh"
@@ -60,11 +60,11 @@
#include "config/the_isa.hh"
#include "cpu/base.hh"
#include "cpu/thread_context.hh"
-#include "mem/translating_port.hh"
#include "mem/page_table.hh"
+#include "mem/translating_port.hh"
#include "sim/byteswap.hh"
-#include "sim/system.hh"
#include "sim/process.hh"
+#include "sim/system.hh"
///
/// System call descriptor.
diff --git a/src/sim/system.cc b/src/sim/system.cc
index e9fd727f1..e710bc5e8 100644
--- a/src/sim/system.cc
+++ b/src/sim/system.cc
@@ -39,14 +39,14 @@
#include "base/loader/object_file.hh"
#include "base/loader/symtab.hh"
#include "base/trace.hh"
-#include "cpu/thread_context.hh"
#include "config/full_system.hh"
#include "config/the_isa.hh"
+#include "cpu/thread_context.hh"
#include "mem/mem_object.hh"
#include "mem/physical.hh"
#include "sim/byteswap.hh"
-#include "sim/system.hh"
#include "sim/debug.hh"
+#include "sim/system.hh"
#if FULL_SYSTEM
#include "arch/vtophys.hh"
diff --git a/src/sim/tlb.cc b/src/sim/tlb.cc
index e2f4f9135..8cde0db2e 100644
--- a/src/sim/tlb.cc
+++ b/src/sim/tlb.cc
@@ -30,8 +30,8 @@
#include "cpu/thread_context.hh"
#include "mem/page_table.hh"
-#include "sim/process.hh"
#include "sim/faults.hh"
+#include "sim/process.hh"
#include "sim/tlb.hh"
Fault
diff --git a/src/sim/vptr.hh b/src/sim/vptr.hh
index 09aa2d213..2033339f9 100644
--- a/src/sim/vptr.hh
+++ b/src/sim/vptr.hh
@@ -31,8 +31,8 @@
#ifndef __ARCH_ALPHA_VPTR_HH__
#define __ARCH_ALPHA_VPTR_HH__
-#include "arch/vtophys.hh"
#include "arch/isa_traits.hh"
+#include "arch/vtophys.hh"
#include "mem/vport.hh"
class ThreadContext;
diff --git a/src/unittest/cprintftest.cc b/src/unittest/cprintftest.cc
index 6722ce6a3..ee5701d13 100644
--- a/src/unittest/cprintftest.cc
+++ b/src/unittest/cprintftest.cc
@@ -30,8 +30,8 @@
#include <iostream>
#include <list>
-#include <string>
#include <sstream>
+#include <string>
#include "base/cprintf.hh"
#include "base/misc.hh"
diff --git a/src/unittest/cprintftime.cc b/src/unittest/cprintftime.cc
index f35e0aa25..3192d8e4d 100644
--- a/src/unittest/cprintftime.cc
+++ b/src/unittest/cprintftime.cc
@@ -30,8 +30,8 @@
#include <iostream>
#include <list>
-#include <string>
#include <sstream>
+#include <string>
#include "base/cprintf.hh"
diff --git a/src/unittest/initest.cc b/src/unittest/initest.cc
index 67ac44874..077b59d36 100644
--- a/src/unittest/initest.cc
+++ b/src/unittest/initest.cc
@@ -29,13 +29,13 @@
* Steve Reinhardt
*/
-#include <iostream>
#include <fstream>
+#include <iostream>
#include <string>
#include <vector>
-#include "base/inifile.hh"
#include "base/cprintf.hh"
+#include "base/inifile.hh"
using namespace std;
diff --git a/src/unittest/rangemaptest.cc b/src/unittest/rangemaptest.cc
index 5ea117cb8..af00e4e58 100644
--- a/src/unittest/rangemaptest.cc
+++ b/src/unittest/rangemaptest.cc
@@ -28,8 +28,8 @@
* Authors: Ali Saidi
*/
-#include <iostream>
#include <cassert>
+#include <iostream>
#include "base/range_map.hh"
#include "base/types.hh"
diff --git a/src/unittest/stattest.cc b/src/unittest/stattest.cc
index 529511c71..e7654ae5b 100644
--- a/src/unittest/stattest.cc
+++ b/src/unittest/stattest.cc
@@ -32,11 +32,11 @@
#include <iostream>
#include <string>
+#include "base/stats/mysql.hh"
+#include "base/stats/text.hh"
#include "base/cprintf.hh"
#include "base/misc.hh"
#include "base/statistics.hh"
-#include "base/stats/text.hh"
-#include "base/stats/mysql.hh"
#include "base/types.hh"
#include "sim/core.hh"
#include "sim/stat_control.hh"
diff --git a/src/unittest/symtest.cc b/src/unittest/symtest.cc
index 10ffb42e5..a40210ba7 100644
--- a/src/unittest/symtest.cc
+++ b/src/unittest/symtest.cc
@@ -30,8 +30,8 @@
#include <iostream>
-#include "base/str.hh"
#include "base/loader/symtab.hh"
+#include "base/str.hh"
using namespace std;