diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-22 09:24:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-22 09:24:26 -0400 |
commit | 20a9e57a09d32c9149e065b73b714b9681349619 (patch) | |
tree | 8d1bd46ea206e52934da08ca5a77446cd57ee767 | |
parent | ad1d69735878a6bf797705b5d2a20316d35e1113 (diff) | |
parent | 4bdf61ccbe76ee0c14bf228e7277072179b36ba3 (diff) |
Merge tag 'for-4.19' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux
Pull arch/h8300 updates from Yoshinori Sato.
* tag 'for-4.19' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux:
h8300: fix IRQ no
arch/h8300: add a defconfig target
arch/h8300: eliminate kgbd.c warning
arch/h8300: eliminate ptrace.h warnings
h8300:let the checker know that size_t is ulong
h8300: Don't include linux/kernel.h in asm/atomic.h
h8300: remove unnecessary of_platform_populate call
h8300: Correct signature of test_bit()
h8300: irqchip: fix warning
h8300: switch to NO_BOOTMEM
h8300: gcc-8.1 fix
h8300: Add missing output register.
-rw-r--r-- | arch/h8300/Kconfig | 1 | ||||
-rw-r--r-- | arch/h8300/Makefile | 4 | ||||
-rw-r--r-- | arch/h8300/boot/dts/h8300h_sim.dts | 2 | ||||
-rw-r--r-- | arch/h8300/include/asm/bitops.h | 14 | ||||
-rw-r--r-- | arch/h8300/include/asm/ptrace.h | 2 | ||||
-rw-r--r-- | arch/h8300/kernel/kgdb.c | 2 | ||||
-rw-r--r-- | arch/h8300/kernel/setup.c | 46 | ||||
-rw-r--r-- | arch/h8300/kernel/sim-console.c | 7 | ||||
-rw-r--r-- | drivers/irqchip/irq-renesas-h8s.c | 6 |
9 files changed, 31 insertions, 53 deletions
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig index 5e89d40be8cd..0b334b671e90 100644 --- a/arch/h8300/Kconfig +++ b/arch/h8300/Kconfig | |||
@@ -16,6 +16,7 @@ config H8300 | |||
16 | select OF_IRQ | 16 | select OF_IRQ |
17 | select OF_EARLY_FLATTREE | 17 | select OF_EARLY_FLATTREE |
18 | select HAVE_MEMBLOCK | 18 | select HAVE_MEMBLOCK |
19 | select NO_BOOTMEM | ||
19 | select TIMER_OF | 20 | select TIMER_OF |
20 | select H8300_TMR8 | 21 | select H8300_TMR8 |
21 | select HAVE_KERNEL_GZIP | 22 | select HAVE_KERNEL_GZIP |
diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile index e1c02ca230cb..cc12b162c222 100644 --- a/arch/h8300/Makefile +++ b/arch/h8300/Makefile | |||
@@ -8,6 +8,8 @@ | |||
8 | # (C) Copyright 2002-2015 Yoshinori Sato <ysato@users.sourceforge.jp> | 8 | # (C) Copyright 2002-2015 Yoshinori Sato <ysato@users.sourceforge.jp> |
9 | # | 9 | # |
10 | 10 | ||
11 | KBUILD_DEFCONFIG := edosk2674_defconfig | ||
12 | |||
11 | cflags-$(CONFIG_CPU_H8300H) := -mh | 13 | cflags-$(CONFIG_CPU_H8300H) := -mh |
12 | aflags-$(CONFIG_CPU_H8300H) := -mh -Wa,--mach=h8300h | 14 | aflags-$(CONFIG_CPU_H8300H) := -mh -Wa,--mach=h8300h |
13 | ldflags-$(CONFIG_CPU_H8300H) := -mh8300helf_linux | 15 | ldflags-$(CONFIG_CPU_H8300H) := -mh8300helf_linux |
@@ -22,6 +24,8 @@ KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\" | |||
22 | KBUILD_AFLAGS += $(aflags-y) | 24 | KBUILD_AFLAGS += $(aflags-y) |
23 | LDFLAGS += $(ldflags-y) | 25 | LDFLAGS += $(ldflags-y) |
24 | 26 | ||
27 | CHECKFLAGS += -msize-long | ||
28 | |||
25 | ifeq ($(CROSS_COMPILE),) | 29 | ifeq ($(CROSS_COMPILE),) |
26 | CROSS_COMPILE := h8300-unknown-linux- | 30 | CROSS_COMPILE := h8300-unknown-linux- |
27 | endif | 31 | endif |
diff --git a/arch/h8300/boot/dts/h8300h_sim.dts b/arch/h8300/boot/dts/h8300h_sim.dts index f1c31cecdec8..595398b9d018 100644 --- a/arch/h8300/boot/dts/h8300h_sim.dts +++ b/arch/h8300/boot/dts/h8300h_sim.dts | |||
@@ -73,7 +73,7 @@ | |||
73 | timer16: timer@ffff68 { | 73 | timer16: timer@ffff68 { |
74 | compatible = "renesas,16bit-timer"; | 74 | compatible = "renesas,16bit-timer"; |
75 | reg = <0xffff68 8>, <0xffff60 8>; | 75 | reg = <0xffff68 8>, <0xffff60 8>; |
76 | interrupts = <24 0>; | 76 | interrupts = <26 0>; |
77 | renesas,channel = <0>; | 77 | renesas,channel = <0>; |
78 | clocks = <&fclk>; | 78 | clocks = <&fclk>; |
79 | clock-names = "fck"; | 79 | clock-names = "fck"; |
diff --git a/arch/h8300/include/asm/bitops.h b/arch/h8300/include/asm/bitops.h index ea0cb0cf6a8b..647a83bd40b7 100644 --- a/arch/h8300/include/asm/bitops.h +++ b/arch/h8300/include/asm/bitops.h | |||
@@ -29,11 +29,11 @@ static inline unsigned long ffz(unsigned long word) | |||
29 | 29 | ||
30 | result = -1; | 30 | result = -1; |
31 | __asm__("1:\n\t" | 31 | __asm__("1:\n\t" |
32 | "shlr.l %2\n\t" | 32 | "shlr.l %1\n\t" |
33 | "adds #1,%0\n\t" | 33 | "adds #1,%0\n\t" |
34 | "bcs 1b" | 34 | "bcs 1b" |
35 | : "=r"(result) | 35 | : "=r"(result),"=r"(word) |
36 | : "0"(result), "r"(word)); | 36 | : "0"(result), "1"(word)); |
37 | return result; | 37 | return result; |
38 | } | 38 | } |
39 | 39 | ||
@@ -66,7 +66,7 @@ H8300_GEN_BITOP(change_bit, "bnot") | |||
66 | 66 | ||
67 | #undef H8300_GEN_BITOP | 67 | #undef H8300_GEN_BITOP |
68 | 68 | ||
69 | static inline int test_bit(int nr, const unsigned long *addr) | 69 | static inline int test_bit(int nr, const volatile unsigned long *addr) |
70 | { | 70 | { |
71 | int ret = 0; | 71 | int ret = 0; |
72 | unsigned char *b_addr; | 72 | unsigned char *b_addr; |
@@ -162,11 +162,11 @@ static inline unsigned long __ffs(unsigned long word) | |||
162 | 162 | ||
163 | result = -1; | 163 | result = -1; |
164 | __asm__("1:\n\t" | 164 | __asm__("1:\n\t" |
165 | "shlr.l %2\n\t" | 165 | "shlr.l %1\n\t" |
166 | "adds #1,%0\n\t" | 166 | "adds #1,%0\n\t" |
167 | "bcc 1b" | 167 | "bcc 1b" |
168 | : "=r" (result) | 168 | : "=r" (result),"=r"(word) |
169 | : "0"(result), "r"(word)); | 169 | : "0"(result), "1"(word)); |
170 | return result; | 170 | return result; |
171 | } | 171 | } |
172 | 172 | ||
diff --git a/arch/h8300/include/asm/ptrace.h b/arch/h8300/include/asm/ptrace.h index 313cafa85380..66d383848ff1 100644 --- a/arch/h8300/include/asm/ptrace.h +++ b/arch/h8300/include/asm/ptrace.h | |||
@@ -4,6 +4,8 @@ | |||
4 | 4 | ||
5 | #include <uapi/asm/ptrace.h> | 5 | #include <uapi/asm/ptrace.h> |
6 | 6 | ||
7 | struct task_struct; | ||
8 | |||
7 | #ifndef __ASSEMBLY__ | 9 | #ifndef __ASSEMBLY__ |
8 | #ifndef PS_S | 10 | #ifndef PS_S |
9 | #define PS_S (0x10) | 11 | #define PS_S (0x10) |
diff --git a/arch/h8300/kernel/kgdb.c b/arch/h8300/kernel/kgdb.c index 602e478afbd5..1a1d30cb0609 100644 --- a/arch/h8300/kernel/kgdb.c +++ b/arch/h8300/kernel/kgdb.c | |||
@@ -129,7 +129,7 @@ void kgdb_arch_exit(void) | |||
129 | /* Nothing to do */ | 129 | /* Nothing to do */ |
130 | } | 130 | } |
131 | 131 | ||
132 | const struct kgdb_arch arch_kgdb_ops = { | 132 | struct kgdb_arch arch_kgdb_ops = { |
133 | /* Breakpoint instruction: trapa #2 */ | 133 | /* Breakpoint instruction: trapa #2 */ |
134 | .gdb_bpt_instr = { 0x57, 0x20 }, | 134 | .gdb_bpt_instr = { 0x57, 0x20 }, |
135 | }; | 135 | }; |
diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c index a4d0470c10a9..34e2df5c0d6d 100644 --- a/arch/h8300/kernel/setup.c +++ b/arch/h8300/kernel/setup.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/of.h> | 24 | #include <linux/of.h> |
25 | #include <linux/of_fdt.h> | 25 | #include <linux/of_fdt.h> |
26 | #include <linux/of_platform.h> | ||
27 | #include <linux/of_address.h> | 26 | #include <linux/of_address.h> |
28 | #include <linux/clk-provider.h> | 27 | #include <linux/clk-provider.h> |
29 | #include <linux/memblock.h> | 28 | #include <linux/memblock.h> |
@@ -71,10 +70,6 @@ void __init h8300_fdt_init(void *fdt, char *bootargs) | |||
71 | 70 | ||
72 | static void __init bootmem_init(void) | 71 | static void __init bootmem_init(void) |
73 | { | 72 | { |
74 | int bootmap_size; | ||
75 | unsigned long ram_start_pfn; | ||
76 | unsigned long free_ram_start_pfn; | ||
77 | unsigned long ram_end_pfn; | ||
78 | struct memblock_region *region; | 73 | struct memblock_region *region; |
79 | 74 | ||
80 | memory_end = memory_start = 0; | 75 | memory_end = memory_start = 0; |
@@ -88,33 +83,17 @@ static void __init bootmem_init(void) | |||
88 | if (!memory_end) | 83 | if (!memory_end) |
89 | panic("No memory!"); | 84 | panic("No memory!"); |
90 | 85 | ||
91 | ram_start_pfn = PFN_UP(memory_start); | 86 | /* setup bootmem globals (we use no_bootmem, but mm still depends on this) */ |
92 | /* free_ram_start_pfn is first page after kernel */ | 87 | min_low_pfn = PFN_UP(memory_start); |
93 | free_ram_start_pfn = PFN_UP(__pa(_end)); | 88 | max_low_pfn = PFN_DOWN(memblock_end_of_DRAM()); |
94 | ram_end_pfn = PFN_DOWN(memblock_end_of_DRAM()); | 89 | max_pfn = max_low_pfn; |
95 | 90 | ||
96 | max_pfn = ram_end_pfn; | 91 | memblock_reserve(__pa(_stext), _end - _stext); |
97 | 92 | ||
98 | /* | 93 | early_init_fdt_reserve_self(); |
99 | * give all the memory to the bootmap allocator, tell it to put the | 94 | early_init_fdt_scan_reserved_mem(); |
100 | * boot mem_map at the start of memory | ||
101 | */ | ||
102 | bootmap_size = init_bootmem_node(NODE_DATA(0), | ||
103 | free_ram_start_pfn, | ||
104 | 0, | ||
105 | ram_end_pfn); | ||
106 | /* | ||
107 | * free the usable memory, we have to make sure we do not free | ||
108 | * the bootmem bitmap so we then reserve it after freeing it :-) | ||
109 | */ | ||
110 | free_bootmem(PFN_PHYS(free_ram_start_pfn), | ||
111 | (ram_end_pfn - free_ram_start_pfn) << PAGE_SHIFT); | ||
112 | reserve_bootmem(PFN_PHYS(free_ram_start_pfn), bootmap_size, | ||
113 | BOOTMEM_DEFAULT); | ||
114 | 95 | ||
115 | for_each_memblock(reserved, region) { | 96 | memblock_dump_all(); |
116 | reserve_bootmem(region->base, region->size, BOOTMEM_DEFAULT); | ||
117 | } | ||
118 | } | 97 | } |
119 | 98 | ||
120 | void __init setup_arch(char **cmdline_p) | 99 | void __init setup_arch(char **cmdline_p) |
@@ -188,15 +167,6 @@ const struct seq_operations cpuinfo_op = { | |||
188 | .show = show_cpuinfo, | 167 | .show = show_cpuinfo, |
189 | }; | 168 | }; |
190 | 169 | ||
191 | static int __init device_probe(void) | ||
192 | { | ||
193 | of_platform_populate(NULL, NULL, NULL, NULL); | ||
194 | |||
195 | return 0; | ||
196 | } | ||
197 | |||
198 | device_initcall(device_probe); | ||
199 | |||
200 | #if defined(CONFIG_CPU_H8300H) | 170 | #if defined(CONFIG_CPU_H8300H) |
201 | #define get_wait(base, addr) ({ \ | 171 | #define get_wait(base, addr) ({ \ |
202 | int baddr; \ | 172 | int baddr; \ |
diff --git a/arch/h8300/kernel/sim-console.c b/arch/h8300/kernel/sim-console.c index 46138f55a9ea..03aa35b1a08c 100644 --- a/arch/h8300/kernel/sim-console.c +++ b/arch/h8300/kernel/sim-console.c | |||
@@ -13,12 +13,13 @@ | |||
13 | 13 | ||
14 | static void sim_write(struct console *con, const char *s, unsigned n) | 14 | static void sim_write(struct console *con, const char *s, unsigned n) |
15 | { | 15 | { |
16 | register const int fd __asm__("er0") = 1; /* stdout */ | ||
17 | register const char *_ptr __asm__("er1") = s; | 16 | register const char *_ptr __asm__("er1") = s; |
18 | register const unsigned _len __asm__("er2") = n; | 17 | register const unsigned _len __asm__("er2") = n; |
19 | 18 | ||
20 | __asm__(".byte 0x5e,0x00,0x00,0xc7\n\t" /* jsr @0xc7 (sys_write) */ | 19 | __asm__("sub.l er0,er0\n\t" /* er0 = 1 (stdout) */ |
21 | : : "g"(fd), "g"(_ptr), "g"(_len)); | 20 | "inc.l #1,er0\n\t" |
21 | ".byte 0x5e,0x00,0x00,0xc7\n\t" /* jsr @0xc7 (sys_write) */ | ||
22 | : : "g"(_ptr), "g"(_len):"er0"); | ||
22 | } | 23 | } |
23 | 24 | ||
24 | static int __init sim_setup(struct earlycon_device *device, const char *opt) | 25 | static int __init sim_setup(struct earlycon_device *device, const char *opt) |
diff --git a/drivers/irqchip/irq-renesas-h8s.c b/drivers/irqchip/irq-renesas-h8s.c index aed31afb0216..85234d456638 100644 --- a/drivers/irqchip/irq-renesas-h8s.c +++ b/drivers/irqchip/irq-renesas-h8s.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <asm/io.h> | 12 | #include <asm/io.h> |
13 | 13 | ||
14 | static void *intc_baseaddr; | 14 | static void *intc_baseaddr; |
15 | #define IPRA ((unsigned long)intc_baseaddr) | 15 | #define IPRA (intc_baseaddr) |
16 | 16 | ||
17 | static const unsigned char ipr_table[] = { | 17 | static const unsigned char ipr_table[] = { |
18 | 0x03, 0x02, 0x01, 0x00, 0x13, 0x12, 0x11, 0x10, /* 16 - 23 */ | 18 | 0x03, 0x02, 0x01, 0x00, 0x13, 0x12, 0x11, 0x10, /* 16 - 23 */ |
@@ -34,7 +34,7 @@ static const unsigned char ipr_table[] = { | |||
34 | static void h8s_disable_irq(struct irq_data *data) | 34 | static void h8s_disable_irq(struct irq_data *data) |
35 | { | 35 | { |
36 | int pos; | 36 | int pos; |
37 | unsigned int addr; | 37 | void __iomem *addr; |
38 | unsigned short pri; | 38 | unsigned short pri; |
39 | int irq = data->irq; | 39 | int irq = data->irq; |
40 | 40 | ||
@@ -48,7 +48,7 @@ static void h8s_disable_irq(struct irq_data *data) | |||
48 | static void h8s_enable_irq(struct irq_data *data) | 48 | static void h8s_enable_irq(struct irq_data *data) |
49 | { | 49 | { |
50 | int pos; | 50 | int pos; |
51 | unsigned int addr; | 51 | void __iomem *addr; |
52 | unsigned short pri; | 52 | unsigned short pri; |
53 | int irq = data->irq; | 53 | int irq = data->irq; |
54 | 54 | ||