23 Oct, 2014

1 commit

  • drivers/base/memory.c provides a default memory_block_size_bytes()
    definition explicitly marked "weak". Several architectures provide their
    own definitions intended to override the default, but the "weak" attribute
    on the declaration applied to the arch definitions as well, so the linker
    chose one based on link order (see 10629d711ed7 ("PCI: Remove __weak
    annotation from pcibios_get_phb_of_node decl")).

    Remove the "weak" attribute from the declaration so we always prefer a
    non-weak definition over the weak one, independent of link order.

    Fixes: 41f107266b19 ("drivers: base: Add prototype declaration to the header file")
    Signed-off-by: Bjorn Helgaas
    Acked-by: Andrew Morton
    CC: Rashika Kheria
    CC: Nathan Fontenot
    CC: Anton Blanchard
    CC: Heiko Carstens
    CC: Yinghai Lu

    Bjorn Helgaas
     

21 Dec, 2013

1 commit

  • Add prototype declaration of function memory_block_size_bytes() to
    the header file include/linux/memory.h.

    This eliminates the following warning in memory.c:
    drivers/base/memory.c:87:1: warning: no previous prototype for ‘memory_block_size_bytes’ [-Wmissing-prototypes]

    Signed-off-by: Rashika Kheria
    Signed-off-by: Greg Kroah-Hartman

    Rashika Kheria
     

22 Aug, 2013

2 commits

  • There are two ways to set the online/offline state for a memory block:
    echo 0|1 > online and echo online|online_kernel|online_movable|offline >
    state.

    The state attribute can online a memory block with extra data, the
    "online type", where the online attribute uses a default online type of
    ONLINE_KEEP, same as echo online > state.

    Currently there is a state_mutex that provides consistency between the
    memory block state and the underlying memory.

    The problem is that this code does a lot of things that the common
    device layer can do for us, such as the serialization of the
    online/offline handlers using the device lock, setting the dev->offline
    field, and calling kobject_uevent().

    This patch refactors the online/offline code to allow the common
    device_[online|offline] functions to be used. The result is a simpler
    and more common code path for the two state setting mechanisms. It also
    removes the state_mutex from the struct memory_block as the memory block
    device lock provides the state consistency.

    No functional change is intended by this patch.

    Signed-off-by: Seth Jennings
    Signed-off-by: Greg Kroah-Hartman

    Seth Jennings
     
  • Now that add_memory_section() is only called from boot time, reduce
    the logic and remove the enum.

    Signed-off-by: Seth Jennings
    Signed-off-by: Greg Kroah-Hartman

    Seth Jennings
     

01 May, 2013

1 commit

  • Fix the following compilation warnings:

    mm/slab.c: In function `kmem_cache_init_late':
    mm/slab.c:1778:2: warning: statement with no effect [-Wunused-value]

    mm/page_cgroup.c: In function `page_cgroup_init':
    mm/page_cgroup.c:305:2: warning: statement with no effect [-Wunused-value]

    Signed-off-by: Vincent Stehlé
    Cc: David Rientjes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vincent Stehlé
     

30 Apr, 2013

2 commits

  • __remove_pages() is only necessary for CONFIG_MEMORY_HOTREMOVE. PowerPC
    pseries will return -EOPNOTSUPP if unsupported.

    Adding an #ifdef causes several other functions it depends on to also
    become unnecessary, which saves in .text when disabled (it's disabled in
    most defconfigs besides powerpc, including x86). remove_memory_block()
    becomes static since it is not referenced outside of
    drivers/base/memory.c.

    Build tested on x86 and powerpc with CONFIG_MEMORY_HOTREMOVE both enabled
    and disabled.

    Signed-off-by: David Rientjes
    Acked-by: Toshi Kani
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Greg Kroah-Hartman
    Cc: Wen Congyang
    Cc: Tang Chen
    Cc: Yasuaki Ishimatsu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • When CONFIG_MEMORY_HOTPLUG=n, we don't want the memory-hotplug notifier
    handlers to be included in the .o files, for space reasons.

    The existing hotplug_memory_notifier() tries to handle this but testing
    with gcc-4.4.4 shows that it doesn't work - the hotplug functions are
    still present in the .o files.

    So implement a new register_hotmemory_notifier() which is a copy of
    register_hotcpu_notifier(), and which actually works as desired.
    hotplug_memory_notifier() and register_memory_notifier() callsites
    should be converted to use this new register_hotmemory_notifier().

    While we're there, let's repair the existing hotplug_memory_notifier():
    it simply stomps on the register_memory_notifier() return value, so
    well-behaved code cannot check for errors. Apparently non of the
    existing callers were well-behaved :(

    Cc: Andrew Shewmaker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

13 Dec, 2012

1 commit

  • Update nodemasks management for N_MEMORY.

    [lliubbo@gmail.com: fix build]
    Signed-off-by: Lai Jiangshan
    Signed-off-by: Wen Congyang
    Cc: Christoph Lameter
    Cc: Hillf Danton
    Cc: Lin Feng
    Cc: David Rientjes
    Signed-off-by: Bob Liu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lai Jiangshan
     

12 Dec, 2012

1 commit

  • Currently memory_hotplug only manages the node_states[N_HIGH_MEMORY], it
    forgets to manage node_states[N_NORMAL_MEMORY]. This may cause
    node_states[N_NORMAL_MEMORY] to become incorrect.

    Example, if a node is empty before online, and we online a memory which is
    in ZONE_NORMAL. And after online, node_states[N_HIGH_MEMORY] is correct,
    but node_states[N_NORMAL_MEMORY] is incorrect, the online code doesn't set
    the new online node to node_states[N_NORMAL_MEMORY].

    The same thing will happen when offlining (the offline code doesn't clear
    the node from node_states[N_NORMAL_MEMORY] when needed). Some memory
    managment code depends node_states[N_NORMAL_MEMORY], so we have to fix up
    the node_states[N_NORMAL_MEMORY].

    We add node_states_check_changes_online() and
    node_states_check_changes_offline() to detect whether
    node_states[N_HIGH_MEMORY] and node_states[N_NORMAL_MEMORY] are changed
    while hotpluging.

    Also add @status_change_nid_normal to struct memory_notify, thus the
    memory hotplug callbacks know whether the node_states[N_NORMAL_MEMORY] are
    changed. (We can add a @flags and reuse @status_change_nid instead of
    introducing @status_change_nid_normal, but it will add much more
    complexity in memory hotplug callback in every subsystem. So introducing
    @status_change_nid_normal is better and it doesn't change the sematics of
    @status_change_nid)

    Signed-off-by: Lai Jiangshan
    Cc: David Rientjes
    Cc: Minchan Kim
    Cc: KOSAKI Motohiro
    Cc: Yasuaki Ishimatsu
    Cc: Rob Landley
    Cc: Jiang Liu
    Cc: Kay Sievers
    Cc: Greg Kroah-Hartman
    Cc: Mel Gorman
    Cc: Wen Congyang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lai Jiangshan
     

18 Sep, 2012

1 commit

  • I found following definition in include/linux/memory.h, in my IA64
    platform, SECTION_SIZE_BITS is equal to 32, and MIN_MEMORY_BLOCK_SIZE
    will be 0.

    #define MIN_MEMORY_BLOCK_SIZE (1 << SECTION_SIZE_BITS)

    Because MIN_MEMORY_BLOCK_SIZE is int type and length of 32bits,
    so MIN_MEMORY_BLOCK_SIZE(1 << 32) will will equal to 0.
    Actually when SECTION_SIZE_BITS >= 31, MIN_MEMORY_BLOCK_SIZE will be wrong.
    This will cause wrong system memory infomation in sysfs.
    I think it should be:

    #define MIN_MEMORY_BLOCK_SIZE (1UL << SECTION_SIZE_BITS)

    And "echo offline > memory0/state" will cause following call trace:

    kernel BUG at mm/memory_hotplug.c:885!
    sh[6455]: bugcheck! 0 [1]
    Pid: 6455, CPU 0, comm: sh
    psr : 0000101008526030 ifs : 8000000000000fa4 ip : [] Not tainted (3.6.0-rc1)
    ip is at offline_pages+0x210/0xee0
    Call Trace:
    show_stack+0x80/0xa0
    show_regs+0x640/0x920
    die+0x190/0x2c0
    die_if_kernel+0x50/0x80
    ia64_bad_break+0x3d0/0x6e0
    ia64_native_leave_kernel+0x0/0x270
    offline_pages+0x210/0xee0
    alloc_pages_current+0x180/0x2a0

    Signed-off-by: Jianguo Wu
    Signed-off-by: Jiang Liu
    Cc: "Luck, Tony"
    Reviewed-by: Michal Hocko
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jianguo Wu
     

22 Dec, 2011

1 commit

  • This moves the 'memory sysdev_class' over to a regular 'memory' subsystem
    and converts the devices to regular devices. The sysdev drivers are
    implemented as subsystem interfaces now.

    After all sysdev classes are ported to regular driver core entities, the
    sysdev implementation will be entirely removed from the kernel.

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     

12 Jul, 2011

1 commit


04 Feb, 2011

1 commit

  • Update the 'phys_index' property of a the memory_block struct to be
    called start_section_nr, and add a end_section_nr property. The
    data tracked here is the same but the updated naming is more in line
    with what is stored here, namely the first and last section number
    that the memory block spans.

    The names presented to userspace remain the same, phys_index for
    start_section_nr and end_phys_index for end_section_nr, to avoid breaking
    anything in userspace.

    This also updates the node sysfs code to be aware of the new capability for
    a memory block to contain multiple memory sections and be aware of the memory
    block structure name changes (start_section_nr). This requires an additional
    parameter to unregister_mem_sect_under_nodes so that we know which memory
    section of the memory block to unregister.

    Signed-off-by: Nathan Fontenot
    Reviewed-by: Robin Holt
    Reviewed-by: KAMEZAWA Hiroyuki
    Signed-off-by: Greg Kroah-Hartman

    Nathan Fontenot
     

23 Oct, 2010

2 commits


18 Mar, 2010

1 commit

  • /sys/devices/system/memory/memoryX/phys_device is supposed to contain the
    number of the physical device that the corresponding piece of memory
    belongs to.

    In case a physical device should be replaced or taken offline for whatever
    reason it is necessary to set all corresponding memory pieces offline.
    The current implementation always sets phys_device to '0' and there is no
    way or hook to change that. Seems like there was a plan to implement that
    but it wasn't finished for whatever reason.

    So add a weak function which architectures can override to actually set
    the phys_device from within add_memory_block().

    Signed-off-by: Heiko Carstens
    Cc: Dave Hansen
    Cc: Gerald Schaefer
    Cc: KAMEZAWA Hiroyuki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     

18 Dec, 2009

1 commit

  • Memory balloon drivers can allocate a large amount of memory which is not
    movable but could be freed to accomodate memory hotplug remove.

    Prior to calling the memory hotplug notifier chain the memory in the
    pageblock is isolated. Currently, if the migrate type is not
    MIGRATE_MOVABLE the isolation will not proceed, causing the memory removal
    for that page range to fail.

    Rather than failing pageblock isolation if the migrateteype is not
    MIGRATE_MOVABLE, this patch checks if all of the pages in the pageblock,
    and not on the LRU, are owned by a registered balloon driver (or other
    entity) using a notifier chain. If all of the non-movable pages are owned
    by a balloon, they can be freed later through the memory notifier chain
    and the range can still be isolated in set_migratetype_isolate().

    Signed-off-by: Robert Jennings
    Cc: Mel Gorman
    Cc: Ingo Molnar
    Cc: Brian King
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Gerald Schaefer
    Cc: KAMEZAWA Hiroyuki
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Benjamin Herrenschmidt

    Robert Jennings
     

06 Apr, 2009

1 commit

  • * 'tracing-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (413 commits)
    tracing, net: fix net tree and tracing tree merge interaction
    tracing, powerpc: fix powerpc tree and tracing tree interaction
    ring-buffer: do not remove reader page from list on ring buffer free
    function-graph: allow unregistering twice
    trace: make argument 'mem' of trace_seq_putmem() const
    tracing: add missing 'extern' keywords to trace_output.h
    tracing: provide trace_seq_reserve()
    blktrace: print out BLK_TN_MESSAGE properly
    blktrace: extract duplidate code
    blktrace: fix memory leak when freeing struct blk_io_trace
    blktrace: fix blk_probes_ref chaos
    blktrace: make classic output more classic
    blktrace: fix off-by-one bug
    blktrace: fix the original blktrace
    blktrace: fix a race when creating blk_tree_root in debugfs
    blktrace: fix timestamp in binary output
    tracing, Text Edit Lock: cleanup
    tracing: filter fix for TRACE_EVENT_FORMAT events
    ftrace: Using FTRACE_WARN_ON() to check "freed record" in ftrace_release()
    x86: kretprobe-booster interrupt emulation code fix
    ...

    Fix up trivial conflicts in
    arch/parisc/include/asm/ftrace.h
    include/linux/memory.h
    kernel/extable.c
    kernel/module.c

    Linus Torvalds
     

03 Apr, 2009

1 commit

  • Add an interface by which other kernel code can read/write persistent
    memory such as I2C or SPI EEPROMs, or devices which provide NVRAM. Use
    cases include storage of board-specific configuration data like Ethernet
    addresses and sensor calibrations.

    Original idea, review and improvement suggestions by David Brownell.

    Acked-by: David Brownell
    Signed-off-by: Kevin Hilman
    Cc: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kevin Hilman
     

06 Mar, 2009

1 commit

  • This is an architecture independant synchronization around kernel text
    modifications through use of a global mutex.

    A mutex has been chosen so that kprobes, the main user of this, can sleep
    during memory allocation between the memory read of the instructions it
    must replace and the memory write of the breakpoint.

    Other user of this interface: immediate values.

    Paravirt and alternatives are always done when SMP is inactive, so there
    is no need to use locks.

    Signed-off-by: Mathieu Desnoyers
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Mathieu Desnoyers
     

07 Jan, 2009

1 commit

  • Show node to memory section relationship with symlinks in sysfs

    Add /sys/devices/system/node/nodeX/memoryY symlinks for all
    the memory sections located on nodeX. For example:
    /sys/devices/system/node/node1/memory135 -> ../../memory/memory135
    indicates that memory section 135 resides on node1.

    Also revises documentation to cover this change as well as updating
    Documentation/ABI/testing/sysfs-devices-memory to include descriptions
    of memory hotremove files 'phys_device', 'phys_index', and 'state'
    that were previously not described there.

    In addition to it always being a good policy to provide users with
    the maximum possible amount of physical location information for
    resources that can be hot-added and/or hot-removed, the following
    are some (but likely not all) of the user benefits provided by
    this change.
    Immediate:
    - Provides information needed to determine the specific node
    on which a defective DIMM is located. This will reduce system
    downtime when the node or defective DIMM is swapped out.
    - Prevents unintended onlining of a memory section that was
    previously offlined due to a defective DIMM. This could happen
    during node hot-add when the user or node hot-add assist script
    onlines _all_ offlined sections due to user or script inability
    to identify the specific memory sections located on the hot-added
    node. The consequences of reintroducing the defective memory
    could be ugly.
    - Provides information needed to vary the amount and distribution
    of memory on specific nodes for testing or debugging purposes.
    Future:
    - Will provide information needed to identify the memory
    sections that need to be offlined prior to physical removal
    of a specific node.

    Symlink creation during boot was tested on 2-node x86_64, 2-node
    ppc64, and 2-node ia64 systems. Symlink creation during physical
    memory hot-add tested on a 2-node x86_64 system.

    Signed-off-by: Gary Hade
    Signed-off-by: Badari Pulavarty
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gary Hade
     

01 Dec, 2008

1 commit


29 Apr, 2008

2 commits

  • Introduce the registration of a callback routine that recomputes msg_ctlmni
    upon memory add / remove.

    A single notifier block is registered in the hotplug memory chain for all the
    ipc namespaces.

    Since the ipc namespaces are not linked together, they have their own
    notification chain: one notifier_block is defined per ipc namespace.

    Each time an ipc namespace is created (removed) it registers (unregisters) its
    notifier block in (from) the ipcns chain. The callback routine registered in
    the memory chain invokes the ipcns notifier chain with the IPCNS_LOWMEM event.
    Each callback routine registered in the ipcns namespace, in turn, recomputes
    msgmni for the owning namespace.

    Signed-off-by: Nadia Derbey
    Cc: Yasunori Goto
    Cc: Matt Helsley
    Cc: Mingming Cao
    Cc: Pierre Peiffer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nadia Derbey
     
  • This is a trivial patch that defines the priority of slab_memory_callback in
    the callback chain as a constant. This is to prepare for next patch in the
    series.

    Signed-off-by: Nadia Derbey
    Cc: Yasunori Goto
    Cc: Matt Helsley
    Cc: Mingming Cao
    Cc: Pierre Peiffer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nadia Derbey
     

20 Apr, 2008

1 commit


22 Oct, 2007

2 commits

  • Fix a panic due to access NULL pointer of kmem_cache_node at discard_slab()
    after memory online.

    When memory online is called, kmem_cache_nodes are created for all SLUBs
    for new node whose memory are available.

    slab_mem_going_online_callback() is called to make kmem_cache_node() in
    callback of memory online event. If it (or other callbacks) fails, then
    slab_mem_offline_callback() is called for rollback.

    In memory offline, slab_mem_going_offline_callback() is called to shrink
    all slub cache, then slab_mem_offline_callback() is called later.

    [akpm@linux-foundation.org: coding-style fixes]
    [akpm@linux-foundation.org: locking fix]
    [akpm@linux-foundation.org: build fix]
    Signed-off-by: Yasunori Goto
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yasunori Goto
     
  • Current memory notifier has some defects yet. (Fortunately, nothing uses
    it.) This patch is to fix and rearrange for them.

    - Add information of start_pfn, nr_pages, and node id if node status is
    changes from/to memoryless node for callback functions.
    Callbacks can't do anything without those information.
    - Add notification going-online status.
    It is necessary for creating per node structure before the node's
    pages are available.
    - Move GOING_OFFLINE status notification after page isolation.
    It is good place for return memory like cache for callback,
    because returned page is not used again.
    - Make CANCEL events for rollingback when error occurs.
    - Delete MEM_MAPPING_INVALID notification. It will be not used.
    - Fix compile error of (un)register_memory_notifier().

    Signed-off-by: Yasunori Goto
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yasunori Goto
     

01 Oct, 2006

1 commit


28 Mar, 2006

1 commit

  • The kernel's implementation of notifier chains is unsafe. There is no
    protection against entries being added to or removed from a chain while the
    chain is in use. The issues were discussed in this thread:

    http://marc.theaimsgroup.com/?l=linux-kernel&m=113018709002036&w=2

    We noticed that notifier chains in the kernel fall into two basic usage
    classes:

    "Blocking" chains are always called from a process context
    and the callout routines are allowed to sleep;

    "Atomic" chains can be called from an atomic context and
    the callout routines are not allowed to sleep.

    We decided to codify this distinction and make it part of the API. Therefore
    this set of patches introduces three new, parallel APIs: one for blocking
    notifiers, one for atomic notifiers, and one for "raw" notifiers (which is
    really just the old API under a new name). New kinds of data structures are
    used for the heads of the chains, and new routines are defined for
    registration, unregistration, and calling a chain. The three APIs are
    explained in include/linux/notifier.h and their implementation is in
    kernel/sys.c.

    With atomic and blocking chains, the implementation guarantees that the chain
    links will not be corrupted and that chain callers will not get messed up by
    entries being added or removed. For raw chains the implementation provides no
    guarantees at all; users of this API must provide their own protections. (The
    idea was that situations may come up where the assumptions of the atomic and
    blocking APIs are not appropriate, so it should be possible for users to
    handle these things in their own way.)

    There are some limitations, which should not be too hard to live with. For
    atomic/blocking chains, registration and unregistration must always be done in
    a process context since the chain is protected by a mutex/rwsem. Also, a
    callout routine for a non-raw chain must not try to register or unregister
    entries on its own chain. (This did happen in a couple of places and the code
    had to be changed to avoid it.)

    Since atomic chains may be called from within an NMI handler, they cannot use
    spinlocks for synchronization. Instead we use RCU. The overhead falls almost
    entirely in the unregister routine, which is okay since unregistration is much
    less frequent that calling a chain.

    Here is the list of chains that we adjusted and their classifications. None
    of them use the raw API, so for the moment it is only a placeholder.

    ATOMIC CHAINS
    -------------
    arch/i386/kernel/traps.c: i386die_chain
    arch/ia64/kernel/traps.c: ia64die_chain
    arch/powerpc/kernel/traps.c: powerpc_die_chain
    arch/sparc64/kernel/traps.c: sparc64die_chain
    arch/x86_64/kernel/traps.c: die_chain
    drivers/char/ipmi/ipmi_si_intf.c: xaction_notifier_list
    kernel/panic.c: panic_notifier_list
    kernel/profile.c: task_free_notifier
    net/bluetooth/hci_core.c: hci_notifier
    net/ipv4/netfilter/ip_conntrack_core.c: ip_conntrack_chain
    net/ipv4/netfilter/ip_conntrack_core.c: ip_conntrack_expect_chain
    net/ipv6/addrconf.c: inet6addr_chain
    net/netfilter/nf_conntrack_core.c: nf_conntrack_chain
    net/netfilter/nf_conntrack_core.c: nf_conntrack_expect_chain
    net/netlink/af_netlink.c: netlink_chain

    BLOCKING CHAINS
    ---------------
    arch/powerpc/platforms/pseries/reconfig.c: pSeries_reconfig_chain
    arch/s390/kernel/process.c: idle_chain
    arch/x86_64/kernel/process.c idle_notifier
    drivers/base/memory.c: memory_chain
    drivers/cpufreq/cpufreq.c cpufreq_policy_notifier_list
    drivers/cpufreq/cpufreq.c cpufreq_transition_notifier_list
    drivers/macintosh/adb.c: adb_client_list
    drivers/macintosh/via-pmu.c sleep_notifier_list
    drivers/macintosh/via-pmu68k.c sleep_notifier_list
    drivers/macintosh/windfarm_core.c wf_client_list
    drivers/usb/core/notify.c usb_notifier_list
    drivers/video/fbmem.c fb_notifier_list
    kernel/cpu.c cpu_chain
    kernel/module.c module_notify_list
    kernel/profile.c munmap_notifier
    kernel/profile.c task_exit_notifier
    kernel/sys.c reboot_notifier_list
    net/core/dev.c netdev_chain
    net/decnet/dn_dev.c: dnaddr_chain
    net/ipv4/devinet.c: inetaddr_chain

    It's possible that some of these classifications are wrong. If they are,
    please let us know or submit a patch to fix them. Note that any chain that
    gets called very frequently should be atomic, because the rwsem read-locking
    used for blocking chains is very likely to incur cache misses on SMP systems.
    (However, if the chain's callout routines may sleep then the chain cannot be
    atomic.)

    The patch set was written by Alan Stern and Chandra Seetharaman, incorporating
    material written by Keith Owens and suggestions from Paul McKenney and Andrew
    Morton.

    [jes@sgi.com: restructure the notifier chain initialization macros]
    Signed-off-by: Alan Stern
    Signed-off-by: Chandra Seetharaman
    Signed-off-by: Jes Sorensen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Stern
     

09 Jan, 2006

1 commit

  • Fix compilation with CONFIG_MEMORY_HOTPLUG=y and gcc41.
    Also remove unneeded declations, add a public function.

    drivers/base/memory.c:53: error: static declaration of 'register_memory_notifier' follows non-static declaration
    include/linux/memory.h:85: error: previous declaration of 'register_memory_notifier' was here
    drivers/base/memory.c:58: error: static declaration of 'unregister_memory_notifier' follows non-static declaration
    include/linux/memory.h:86: error: previous declaration of 'unregister_memory_notifier' was here
    drivers/base/memory.c:68: error: static declaration of 'register_memory' follows non-static declaration
    include/linux/memory.h:73: error: previous declaration of 'register_memory' was here

    Signed-off-by: Olaf Hering
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Olaf Hering
     

29 Nov, 2005

1 commit

  • So don't define it as extern in the header file.

    drivers/base/memory.c:28: error: static declaration of 'memory_sysdev_class' follows non-static declaration
    include/linux/memory.h:88: error: previous declaration of 'memory_sysdev_class' was here

    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

07 Nov, 2005

1 commit

  • Fix more include file problems that surfaced since I submitted the previous
    fix-missing-includes.patch. This should now allow not to include sched.h
    from module.h, which is done by a followup patch.

    Signed-off-by: Tim Schmielau
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau
     

30 Oct, 2005

1 commit

  • This adds generic memory add/remove and supporting functions for memory
    hotplug into a new file as well as a memory hotplug kernel config option.

    Individual architecture patches will follow.

    For now, disable memory hotplug when swsusp is enabled. There's a lot of
    churn there right now. We'll fix it up properly once it calms down.

    Signed-off-by: Matt Tolentino
    Signed-off-by: Dave Hansen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Hansen