diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-02 20:20:12 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-02 20:20:12 -0700 |
commit | f5a8eb632b562bd9c16c389f5db3a5260fba4157 (patch) | |
tree | 82687234d772ff8f72a31e598fe16553885c56c9 /arch/m32r/mm/discontig.c | |
parent | c9297d284126b80c9cfd72c690e0da531c99fc48 (diff) | |
parent | dd3b8c329aa270027fba61a02a12600972dc3983 (diff) | |
download | linux-f5a8eb632b562bd9c16c389f5db3a5260fba4157.tar.bz2 |
Merge tag 'arch-removal' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic
Pul removal of obsolete architecture ports from Arnd Bergmann:
"This removes the entire architecture code for blackfin, cris, frv,
m32r, metag, mn10300, score, and tile, including the associated device
drivers.
I have been working with the (former) maintainers for each one to
ensure that my interpretation was right and the code is definitely
unused in mainline kernels. Many had fond memories of working on the
respective ports to start with and getting them included in upstream,
but also saw no point in keeping the port alive without any users.
In the end, it seems that while the eight architectures are extremely
different, they all suffered the same fate: There was one company in
charge of an SoC line, a CPU microarchitecture and a software
ecosystem, which was more costly than licensing newer off-the-shelf
CPU cores from a third party (typically ARM, MIPS, or RISC-V). It
seems that all the SoC product lines are still around, but have not
used the custom CPU architectures for several years at this point. In
contrast, CPU instruction sets that remain popular and have actively
maintained kernel ports tend to all be used across multiple licensees.
[ See the new nds32 port merged in the previous commit for the next
generation of "one company in charge of an SoC line, a CPU
microarchitecture and a software ecosystem" - Linus ]
The removal came out of a discussion that is now documented at
https://lwn.net/Articles/748074/. Unlike the original plans, I'm not
marking any ports as deprecated but remove them all at once after I
made sure that they are all unused. Some architectures (notably tile,
mn10300, and blackfin) are still being shipped in products with old
kernels, but those products will never be updated to newer kernel
releases.
After this series, we still have a few architectures without mainline
gcc support:
- unicore32 and hexagon both have very outdated gcc releases, but the
maintainers promised to work on providing something newer. At least
in case of hexagon, this will only be llvm, not gcc.
- openrisc, risc-v and nds32 are still in the process of finishing
their support or getting it added to mainline gcc in the first
place. They all have patched gcc-7.3 ports that work to some
degree, but complete upstream support won't happen before gcc-8.1.
Csky posted their first kernel patch set last week, their situation
will be similar
[ Palmer Dabbelt points out that RISC-V support is in mainline gcc
since gcc-7, although gcc-7.3.0 is the recommended minimum - Linus ]"
This really says it all:
2498 files changed, 95 insertions(+), 467668 deletions(-)
* tag 'arch-removal' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: (74 commits)
MAINTAINERS: UNICORE32: Change email account
staging: iio: remove iio-trig-bfin-timer driver
tty: hvc: remove tile driver
tty: remove bfin_jtag_comm and hvc_bfin_jtag drivers
serial: remove tile uart driver
serial: remove m32r_sio driver
serial: remove blackfin drivers
serial: remove cris/etrax uart drivers
usb: Remove Blackfin references in USB support
usb: isp1362: remove blackfin arch glue
usb: musb: remove blackfin port
usb: host: remove tilegx platform glue
pwm: remove pwm-bfin driver
i2c: remove bfin-twi driver
spi: remove blackfin related host drivers
watchdog: remove bfin_wdt driver
can: remove bfin_can driver
mmc: remove bfin_sdh driver
input: misc: remove blackfin rotary driver
input: keyboard: remove bf54x driver
...
Diffstat (limited to 'arch/m32r/mm/discontig.c')
-rw-r--r-- | arch/m32r/mm/discontig.c | 163 |
1 files changed, 0 insertions, 163 deletions
diff --git a/arch/m32r/mm/discontig.c b/arch/m32r/mm/discontig.c deleted file mode 100644 index eb8e7966dcaf..000000000000 --- a/arch/m32r/mm/discontig.c +++ /dev/null @@ -1,163 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * linux/arch/m32r/mm/discontig.c - * - * Discontig memory support - * - * Copyright (c) 2003 Hitoshi Yamamoto - */ - -#include <linux/mm.h> -#include <linux/bootmem.h> -#include <linux/mmzone.h> -#include <linux/initrd.h> -#include <linux/nodemask.h> -#include <linux/module.h> -#include <linux/pfn.h> - -#include <asm/setup.h> - -extern char _end[]; - -struct pglist_data *node_data[MAX_NUMNODES]; -EXPORT_SYMBOL(node_data); - -pg_data_t m32r_node_data[MAX_NUMNODES]; - -/* Memory profile */ -typedef struct { - unsigned long start_pfn; - unsigned long pages; - unsigned long holes; - unsigned long free_pfn; -} mem_prof_t; -static mem_prof_t mem_prof[MAX_NUMNODES]; - -extern unsigned long memory_start; -extern unsigned long memory_end; - -static void __init mem_prof_init(void) -{ - unsigned long start_pfn, holes, free_pfn; - const unsigned long zone_alignment = 1UL << (MAX_ORDER - 1); - unsigned long ul; - mem_prof_t *mp; - - /* Node#0 SDRAM */ - mp = &mem_prof[0]; - mp->start_pfn = PFN_UP(CONFIG_MEMORY_START); - mp->pages = PFN_DOWN(memory_end - memory_start); - mp->holes = 0; - mp->free_pfn = PFN_UP(__pa(_end)); - - /* Node#1 internal SRAM */ - mp = &mem_prof[1]; - start_pfn = free_pfn = PFN_UP(CONFIG_IRAM_START); - holes = 0; - if (start_pfn & (zone_alignment - 1)) { - ul = zone_alignment; - while (start_pfn >= ul) - ul += zone_alignment; - - start_pfn = ul - zone_alignment; - holes = free_pfn - start_pfn; - } - - mp->start_pfn = start_pfn; - mp->pages = PFN_DOWN(CONFIG_IRAM_SIZE) + holes; - mp->holes = holes; - mp->free_pfn = PFN_UP(CONFIG_IRAM_START); -} - -unsigned long __init setup_memory(void) -{ - unsigned long bootmap_size; - unsigned long min_pfn; - int nid; - mem_prof_t *mp; - - max_low_pfn = 0; - min_low_pfn = -1; - - mem_prof_init(); - - for_each_online_node(nid) { - mp = &mem_prof[nid]; - NODE_DATA(nid)=(pg_data_t *)&m32r_node_data[nid]; - NODE_DATA(nid)->bdata = &bootmem_node_data[nid]; - min_pfn = mp->start_pfn; - max_pfn = mp->start_pfn + mp->pages; - bootmap_size = init_bootmem_node(NODE_DATA(nid), mp->free_pfn, - mp->start_pfn, max_pfn); - - free_bootmem_node(NODE_DATA(nid), PFN_PHYS(mp->start_pfn), - PFN_PHYS(mp->pages)); - - reserve_bootmem_node(NODE_DATA(nid), PFN_PHYS(mp->start_pfn), - PFN_PHYS(mp->free_pfn - mp->start_pfn) + bootmap_size, - BOOTMEM_DEFAULT); - - if (max_low_pfn < max_pfn) - max_low_pfn = max_pfn; - - if (min_low_pfn > min_pfn) - min_low_pfn = min_pfn; - } - -#ifdef CONFIG_BLK_DEV_INITRD - if (LOADER_TYPE && INITRD_START) { - if (INITRD_START + INITRD_SIZE <= PFN_PHYS(max_low_pfn)) { - reserve_bootmem_node(NODE_DATA(0), INITRD_START, - INITRD_SIZE, BOOTMEM_DEFAULT); - initrd_start = INITRD_START + PAGE_OFFSET; - initrd_end = initrd_start + INITRD_SIZE; - printk("initrd:start[%08lx],size[%08lx]\n", - initrd_start, INITRD_SIZE); - } else { - printk("initrd extends beyond end of memory " - "(0x%08lx > 0x%08llx)\ndisabling initrd\n", - INITRD_START + INITRD_SIZE, - (unsigned long long)PFN_PHYS(max_low_pfn)); - - initrd_start = 0; - } - } -#endif /* CONFIG_BLK_DEV_INITRD */ - - return max_low_pfn; -} - -#define START_PFN(nid) (NODE_DATA(nid)->bdata->node_min_pfn) -#define MAX_LOW_PFN(nid) (NODE_DATA(nid)->bdata->node_low_pfn) - -void __init zone_sizes_init(void) -{ - unsigned long zones_size[MAX_NR_ZONES], zholes_size[MAX_NR_ZONES]; - unsigned long low, start_pfn; - int nid, i; - mem_prof_t *mp; - - for_each_online_node(nid) { - mp = &mem_prof[nid]; - for (i = 0 ; i < MAX_NR_ZONES ; i++) { - zones_size[i] = 0; - zholes_size[i] = 0; - } - start_pfn = START_PFN(nid); - low = MAX_LOW_PFN(nid); - zones_size[ZONE_DMA] = low - start_pfn; - zholes_size[ZONE_DMA] = mp->holes; - - node_set_state(nid, N_NORMAL_MEMORY); - free_area_init_node(nid, zones_size, start_pfn, zholes_size); - } - - /* - * For test - * Use all area of internal RAM. - * see __alloc_pages() - */ - NODE_DATA(1)->node_zones->watermark[WMARK_MIN] = 0; - NODE_DATA(1)->node_zones->watermark[WMARK_LOW] = 0; - NODE_DATA(1)->node_zones->watermark[WMARK_HIGH] = 0; -} |