Skip to content

Commit

Permalink
Merge branch 'akpm' (patches from Andrew)
Browse files Browse the repository at this point in the history
Merge misc updates from Andrew Morton:

 - a few misc things

 - the rest of MM

-  remove flex_arrays, replace with new simple radix-tree implementation

* emailed patches from Andrew Morton <[email protected]>: (38 commits)
  Drop flex_arrays
  sctp: convert to genradix
  proc: commit to genradix
  generic radix trees
  selinux: convert to kvmalloc
  md: convert to kvmalloc
  openvswitch: convert to kvmalloc
  of: fix kmemleak crash caused by imbalance in early memory reservation
  mm: memblock: update comments and kernel-doc
  memblock: split checks whether a region should be skipped to a helper function
  memblock: remove memblock_{set,clear}_region_flags
  memblock: drop memblock_alloc_*_nopanic() variants
  memblock: memblock_alloc_try_nid: don't panic
  treewide: add checks for the return value of memblock_alloc*()
  swiotlb: add checks for the return value of memblock_alloc*()
  init/main: add checks for the return value of memblock_alloc*()
  mm/percpu: add checks for the return value of memblock_alloc*()
  sparc: add checks for the return value of memblock_alloc*()
  ia64: add checks for the return value of memblock_alloc*()
  arch: don't memset(0) memory returned by memblock_alloc()
  ...
  • Loading branch information
torvalds committed Mar 12, 2019
2 parents cb1d150 + 586187d commit a667cb7
Show file tree
Hide file tree
Showing 159 changed files with 1,651 additions and 1,707 deletions.
130 changes: 0 additions & 130 deletions Documentation/core-api/flexible-arrays.rst

This file was deleted.

12 changes: 12 additions & 0 deletions Documentation/core-api/generic-radix-tree.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
=================================
Generic radix trees/sparse arrays
=================================

.. kernel-doc:: include/linux/generic-radix-tree.h
:doc: Generic radix trees/sparse arrays

generic radix tree functions
----------------------------

.. kernel-doc:: include/linux/generic-radix-tree.h
:functions:
1 change: 1 addition & 0 deletions Documentation/core-api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Core utilities
errseq
printk-formats
circular-buffers
generic-radix-tree
memory-allocation
mm-api
gfp_mask-from-fs-io
Expand Down
123 changes: 0 additions & 123 deletions Documentation/flexible-arrays.txt

This file was deleted.

5 changes: 4 additions & 1 deletion arch/alpha/kernel/core_cia.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,10 @@ cia_prepare_tbia_workaround(int window)
long i;

/* Use minimal 1K map. */
ppte = memblock_alloc_from(CIA_BROKEN_TBIA_SIZE, 32768, 0);
ppte = memblock_alloc(CIA_BROKEN_TBIA_SIZE, 32768);
if (!ppte)
panic("%s: Failed to allocate %u bytes align=0x%x\n",
__func__, CIA_BROKEN_TBIA_SIZE, 32768);
pte = (virt_to_phys(ppte) >> (PAGE_SHIFT - 1)) | 1;

for (i = 0; i < CIA_BROKEN_TBIA_SIZE / sizeof(unsigned long); ++i)
Expand Down
6 changes: 6 additions & 0 deletions arch/alpha/kernel/core_marvel.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ mk_resource_name(int pe, int port, char *str)

sprintf(tmp, "PCI %s PE %d PORT %d", str, pe, port);
name = memblock_alloc(strlen(tmp) + 1, SMP_CACHE_BYTES);
if (!name)
panic("%s: Failed to allocate %zu bytes\n", __func__,
strlen(tmp) + 1);
strcpy(name, tmp);

return name;
Expand Down Expand Up @@ -118,6 +121,9 @@ alloc_io7(unsigned int pe)
}

io7 = memblock_alloc(sizeof(*io7), SMP_CACHE_BYTES);
if (!io7)
panic("%s: Failed to allocate %zu bytes\n", __func__,
sizeof(*io7));
io7->pe = pe;
raw_spin_lock_init(&io7->irq_lock);

Expand Down
13 changes: 11 additions & 2 deletions arch/alpha/kernel/pci-noop.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ alloc_pci_controller(void)
struct pci_controller *hose;

hose = memblock_alloc(sizeof(*hose), SMP_CACHE_BYTES);
if (!hose)
panic("%s: Failed to allocate %zu bytes\n", __func__,
sizeof(*hose));

*hose_tail = hose;
hose_tail = &hose->next;
Expand All @@ -44,7 +47,13 @@ alloc_pci_controller(void)
struct resource * __init
alloc_resource(void)
{
return memblock_alloc(sizeof(struct resource), SMP_CACHE_BYTES);
void *ptr = memblock_alloc(sizeof(struct resource), SMP_CACHE_BYTES);

if (!ptr)
panic("%s: Failed to allocate %zu bytes\n", __func__,
sizeof(struct resource));

return ptr;
}

SYSCALL_DEFINE3(pciconfig_iobase, long, which, unsigned long, bus,
Expand All @@ -54,7 +63,7 @@ SYSCALL_DEFINE3(pciconfig_iobase, long, which, unsigned long, bus,

/* from hose or from bus.devfn */
if (which & IOBASE_FROM_HOSE) {
for (hose = hose_head; hose; hose = hose->next)
for (hose = hose_head; hose; hose = hose->next)
if (hose->index == bus)
break;
if (!hose)
Expand Down
11 changes: 10 additions & 1 deletion arch/alpha/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,9 @@ alloc_pci_controller(void)
struct pci_controller *hose;

hose = memblock_alloc(sizeof(*hose), SMP_CACHE_BYTES);
if (!hose)
panic("%s: Failed to allocate %zu bytes\n", __func__,
sizeof(*hose));

*hose_tail = hose;
hose_tail = &hose->next;
Expand All @@ -403,7 +406,13 @@ alloc_pci_controller(void)
struct resource * __init
alloc_resource(void)
{
return memblock_alloc(sizeof(struct resource), SMP_CACHE_BYTES);
void *ptr = memblock_alloc(sizeof(struct resource), SMP_CACHE_BYTES);

if (!ptr)
panic("%s: Failed to allocate %zu bytes\n", __func__,
sizeof(struct resource));

return ptr;
}


Expand Down
Loading

0 comments on commit a667cb7

Please sign in to comment.