Skip to content

Commit 2f2a213

Browse files
committed
Separate out the proc- and unit-specific header directories from the general
MN10300 arch headers and place them instead in the same directories as contain the .c files for the processor and unit implementations. This permits the symlinks include/asm/proc and include/asm/unit to be dispensed with. This does, however, require that #include <asm/proc/xxx.h> be converted to #include <proc/xxx.h> and similarly for asm/unit -> unit. Signed-off-by: David Howells <dhowells@redhat.com>
1 parent da76166 commit 2f2a213

35 files changed

Lines changed: 31 additions & 65 deletions

‎arch/mn10300/Makefile‎

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -94,42 +94,8 @@ ifdef CONFIG_DEBUG_INFO
9494
KBUILD_AFLAGS += -Wa,--gdwarf2
9595
endif
9696

97-
###################################################################################################
9897
#
99-
# juggle some symlinks in the MN10300 asm include dir
98+
# include the appropriate processor- and unit-specific headers
10099
#
101-
# Update machine proc and unit symlinks if something which affects
102-
# them changed. We use .proc / .unit to indicate when they were
103-
# updated last, otherwise make uses the target directory mtime.
104-
#
105-
###################################################################################################
106-
107-
# processor specific definitions
108-
arch/mn10300/include/asm/.proc: $(wildcard include/config/proc/*.h) include/config/auto.conf
109-
@echo ' SYMLINK arch/mn10300/include/asm/proc -> arch/mn10300/include/asm/proc-$(PROCESSOR)'
110-
ifneq ($(KBUILD_SRC),)
111-
$(Q)mkdir -p arch/mn10300/include/asm
112-
$(Q)ln -fsn $(srctree)/arch/mn10300/include/asm/proc-$(PROCESSOR) arch/mn10300/include/asm/proc
113-
else
114-
$(Q)ln -fsn proc-$(PROCESSOR) arch/mn10300/include/asm/proc
115-
endif
116-
@touch $@
117-
118-
CLEAN_FILES += arch/mn10300/include/asm/proc arch/mn10300/include/asm/.proc
119-
120-
prepare: arch/mn10300/include/asm/.proc
121-
122-
# unit specific definitions
123-
arch/mn10300/include/asm/.unit: $(wildcard include/config/unit/*.h) include/config/auto.conf
124-
@echo ' SYMLINK arch/mn10300/include/asm/unit -> arch/mn10300/include/asm/unit-$(UNIT)'
125-
ifneq ($(KBUILD_SRC),)
126-
$(Q)mkdir -p arch/mn10300/include/asm
127-
$(Q)ln -fsn $(srctree)/arch/mn10300/include/asm/unit-$(UNIT) arch/mn10300/include/asm/unit
128-
else
129-
$(Q)ln -fsn unit-$(UNIT) arch/mn10300/include/asm/unit
130-
endif
131-
@touch $@
132-
133-
CLEAN_FILES += arch/mn10300/include/asm/unit arch/mn10300/include/asm/.unit
134-
135-
prepare: arch/mn10300/include/asm/.unit
100+
KBUILD_CPPFLAGS += -I$(srctree)/arch/mn10300/proc-$(PROCESSOR)/include
101+
KBUILD_CPPFLAGS += -I$(srctree)/arch/mn10300/unit-$(UNIT)/include

‎arch/mn10300/include/asm/cache.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#define _ASM_CACHE_H
1414

1515
#include <asm/cpu-regs.h>
16-
#include <asm/proc/cache.h>
16+
#include <proc/cache.h>
1717

1818
#ifndef __ASSEMBLY__
1919
#define L1_CACHE_DISPARITY (L1_CACHE_NENTRIES * L1_CACHE_BYTES)

‎arch/mn10300/include/asm/irq.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#include <asm/intctl-regs.h>
1818
#include <asm/reset-regs.h>
19-
#include <asm/proc/irq.h>
19+
#include <proc/irq.h>
2020

2121
/* this number is used when no interrupt has been assigned */
2222
#define NO_IRQ INT_MAX

‎arch/mn10300/include/asm/serial.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@
3333
#define RS_TABLE_SIZE
3434
#endif
3535

36-
#include <asm/unit/serial.h>
36+
#include <unit/serial.h>

‎arch/mn10300/include/asm/timex.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#define _ASM_TIMEX_H
1313

1414
#include <asm/hardirq.h>
15-
#include <asm/unit/timex.h>
15+
#include <unit/timex.h>
1616

1717
#define TICK_SIZE (tick_nsec / 1000)
1818

‎arch/mn10300/kernel/entry.S‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include <asm/intctl-regs.h>
2121
#include <asm/busctl-regs.h>
2222
#include <asm/timer-regs.h>
23-
#include <asm/unit/leds.h>
23+
#include <unit/leds.h>
2424
#include <asm/page.h>
2525
#include <asm/pgtable.h>
2626
#include <asm/errno.h>

‎arch/mn10300/kernel/gdb-io-serial-low.S‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include <asm/thread_info.h>
1919
#include <asm/frame.inc>
2020
#include <asm/intctl-regs.h>
21-
#include <asm/unit/serial.h>
21+
#include <unit/serial.h>
2222

2323
.text
2424

‎arch/mn10300/kernel/gdb-io-serial.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <asm/gdb-stub.h>
2323
#include <asm/exceptions.h>
2424
#include <asm/serial-regs.h>
25-
#include <asm/unit/serial.h>
25+
#include <unit/serial.h>
2626

2727
/*
2828
* initialise the GDB stub

‎arch/mn10300/kernel/gdb-io-ttysm-low.S‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include <asm/cpu-regs.h>
1919
#include <asm/frame.inc>
2020
#include <asm/intctl-regs.h>
21-
#include <asm/unit/serial.h>
21+
#include <unit/serial.h>
2222
#include "mn10300-serial.h"
2323

2424
.text

‎arch/mn10300/kernel/gdb-io-ttysm.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include <asm/system.h>
2121
#include <asm/gdb-stub.h>
2222
#include <asm/exceptions.h>
23-
#include <asm/unit/clock.h>
23+
#include <unit/clock.h>
2424
#include "mn10300-serial.h"
2525

2626
#if defined(CONFIG_GDBSTUB_ON_TTYSM0)

0 commit comments

Comments
 (0)