mirror of
https://github.com/suyu-emu/horinux.git
synced 2026-09-21 14:15:21 -07:00
Merge branch 'akpm' (updates from Andrew Morton)
Merge first patch-bomb from Andrew Morton: - various misc bits - I'm been patchmonkeying ocfs2 for a while, as Joel and Mark have been distracted. There has been quite a bit of activity. - About half the MM queue - Some backlight bits - Various lib/ updates - checkpatch updates - zillions more little rtc patches - ptrace - signals - exec - procfs - rapidio - nbd - aoe - pps - memstick - tools/testing/selftests updates * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (445 commits) tools/testing/selftests: don't assume the x bit is set on scripts selftests: add .gitignore for kcmp selftests: fix clean target in kcmp Makefile selftests: add .gitignore for vm selftests: add hugetlbfstest self-test: fix make clean selftests: exit 1 on failure kernel/resource.c: remove the unneeded assignment in function __find_resource aio: fix wrong comment in aio_complete() drivers/w1/slaves/w1_ds2408.c: add magic sequence to disable P0 test mode drivers/memstick/host/r592.c: convert to module_pci_driver drivers/memstick/host/jmb38x_ms: convert to module_pci_driver pps-gpio: add device-tree binding and support drivers/pps/clients/pps-gpio.c: convert to module_platform_driver drivers/pps/clients/pps-gpio.c: convert to devm_* helpers drivers/parport/share.c: use kzalloc Documentation/accounting/getdelays.c: avoid strncpy in accounting tool aoe: update internal version number to v83 aoe: update copyright date aoe: perform I/O completions in parallel ...
This commit is contained in:
@@ -389,7 +389,8 @@ Albeit deprecated by some people, the equivalent of the goto statement is
|
||||
used frequently by compilers in form of the unconditional jump instruction.
|
||||
|
||||
The goto statement comes in handy when a function exits from multiple
|
||||
locations and some common work such as cleanup has to be done.
|
||||
locations and some common work such as cleanup has to be done. If there is no
|
||||
cleanup needed then just return directly.
|
||||
|
||||
The rationale is:
|
||||
|
||||
|
||||
@@ -1955,12 +1955,17 @@ machines due to caching.
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
<chapter id="apiref">
|
||||
<chapter id="apiref-mutex">
|
||||
<title>Mutex API reference</title>
|
||||
!Iinclude/linux/mutex.h
|
||||
!Ekernel/mutex.c
|
||||
</chapter>
|
||||
|
||||
<chapter id="apiref-futex">
|
||||
<title>Futex API reference</title>
|
||||
!Ikernel/futex.c
|
||||
</chapter>
|
||||
|
||||
<chapter id="references">
|
||||
<title>Further reading</title>
|
||||
|
||||
|
||||
@@ -272,7 +272,7 @@ int main(int argc, char *argv[])
|
||||
char *logfile = NULL;
|
||||
int loop = 0;
|
||||
int containerset = 0;
|
||||
char containerpath[1024];
|
||||
char *containerpath = NULL;
|
||||
int cfd = 0;
|
||||
int forking = 0;
|
||||
sigset_t sigset;
|
||||
@@ -299,7 +299,7 @@ int main(int argc, char *argv[])
|
||||
break;
|
||||
case 'C':
|
||||
containerset = 1;
|
||||
strncpy(containerpath, optarg, strlen(optarg) + 1);
|
||||
containerpath = optarg;
|
||||
break;
|
||||
case 'w':
|
||||
logfile = strdup(optarg);
|
||||
|
||||
@@ -834,10 +834,9 @@ Test:
|
||||
|
||||
12. TODO
|
||||
|
||||
1. Add support for accounting huge pages (as a separate controller)
|
||||
2. Make per-cgroup scanner reclaim not-shared pages first
|
||||
3. Teach controller to account for shared-pages
|
||||
4. Start reclamation in the background when the limit is
|
||||
1. Make per-cgroup scanner reclaim not-shared pages first
|
||||
2. Teach controller to account for shared-pages
|
||||
3. Start reclamation in the background when the limit is
|
||||
not yet hit but the usage is getting closer
|
||||
|
||||
Summary
|
||||
|
||||
@@ -222,5 +222,4 @@ drivers/dma/: location for offload engine drivers
|
||||
include/linux/async_tx.h: core header file for the async_tx api
|
||||
crypto/async_tx/async_tx.c: async_tx interface to dmaengine and common code
|
||||
crypto/async_tx/async_memcpy.c: copy offload
|
||||
crypto/async_tx/async_memset.c: memory fill offload
|
||||
crypto/async_tx/async_xor.c: xor and xor zero sum offload
|
||||
|
||||
@@ -100,8 +100,7 @@ Your cooperation is appreciated.
|
||||
10 = /dev/aio Asynchronous I/O notification interface
|
||||
11 = /dev/kmsg Writes to this come out as printk's, reads
|
||||
export the buffered printk records.
|
||||
12 = /dev/oldmem Used by crashdump kernels to access
|
||||
the memory of the kernel that crashed.
|
||||
12 = /dev/oldmem OBSOLETE - replaced by /proc/vmcore
|
||||
|
||||
1 block RAM disk
|
||||
0 = /dev/ram0 First RAM disk
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
Device-Tree Bindings for a PPS Signal on GPIO
|
||||
|
||||
These properties describe a PPS (pulse-per-second) signal connected to
|
||||
a GPIO pin.
|
||||
|
||||
Required properties:
|
||||
- compatible: should be "pps-gpio"
|
||||
- gpios: one PPS GPIO in the format described by ../gpio/gpio.txt
|
||||
|
||||
Optional properties:
|
||||
- assert-falling-edge: when present, assert is indicated by a falling edge
|
||||
(instead of by a rising edge)
|
||||
|
||||
Example:
|
||||
pps {
|
||||
compatible = "pps-gpio";
|
||||
gpios = <&gpio2 6 0>;
|
||||
|
||||
assert-falling-edge;
|
||||
};
|
||||
@@ -473,7 +473,8 @@ This file is only present if the CONFIG_MMU kernel configuration option is
|
||||
enabled.
|
||||
|
||||
The /proc/PID/clear_refs is used to reset the PG_Referenced and ACCESSED/YOUNG
|
||||
bits on both physical and virtual pages associated with a process.
|
||||
bits on both physical and virtual pages associated with a process, and the
|
||||
soft-dirty bit on pte (see Documentation/vm/soft-dirty.txt for details).
|
||||
To clear the bits for all the pages associated with the process
|
||||
> echo 1 > /proc/PID/clear_refs
|
||||
|
||||
@@ -482,6 +483,10 @@ To clear the bits for the anonymous pages associated with the process
|
||||
|
||||
To clear the bits for the file mapped pages associated with the process
|
||||
> echo 3 > /proc/PID/clear_refs
|
||||
|
||||
To clear the soft-dirty bit
|
||||
> echo 4 > /proc/PID/clear_refs
|
||||
|
||||
Any other value written to /proc/PID/clear_refs will have no effect.
|
||||
|
||||
The /proc/pid/pagemap gives the PFN, which can be used to find the pageflags
|
||||
|
||||
@@ -559,7 +559,6 @@ your filesystem. The following members are defined:
|
||||
struct address_space_operations {
|
||||
int (*writepage)(struct page *page, struct writeback_control *wbc);
|
||||
int (*readpage)(struct file *, struct page *);
|
||||
int (*sync_page)(struct page *);
|
||||
int (*writepages)(struct address_space *, struct writeback_control *);
|
||||
int (*set_page_dirty)(struct page *page);
|
||||
int (*readpages)(struct file *filp, struct address_space *mapping,
|
||||
@@ -581,6 +580,9 @@ struct address_space_operations {
|
||||
/* migrate the contents of a page to the specified target */
|
||||
int (*migratepage) (struct page *, struct page *);
|
||||
int (*launder_page) (struct page *);
|
||||
int (*is_partially_uptodate) (struct page *, read_descriptor_t *,
|
||||
unsigned long);
|
||||
void (*is_dirty_writeback) (struct page *, bool *, bool *);
|
||||
int (*error_remove_page) (struct mapping *mapping, struct page *page);
|
||||
int (*swap_activate)(struct file *);
|
||||
int (*swap_deactivate)(struct file *);
|
||||
@@ -612,13 +614,6 @@ struct address_space_operations {
|
||||
In this case, the page will be relocated, relocked and if
|
||||
that all succeeds, ->readpage will be called again.
|
||||
|
||||
sync_page: called by the VM to notify the backing store to perform all
|
||||
queued I/O operations for a page. I/O operations for other pages
|
||||
associated with this address_space object may also be performed.
|
||||
|
||||
This function is optional and is called only for pages with
|
||||
PG_Writeback set while waiting for the writeback to complete.
|
||||
|
||||
writepages: called by the VM to write out pages associated with the
|
||||
address_space object. If wbc->sync_mode is WBC_SYNC_ALL, then
|
||||
the writeback_control will specify a range of pages that must be
|
||||
@@ -747,6 +742,20 @@ struct address_space_operations {
|
||||
prevent redirtying the page, it is kept locked during the whole
|
||||
operation.
|
||||
|
||||
is_partially_uptodate: Called by the VM when reading a file through the
|
||||
pagecache when the underlying blocksize != pagesize. If the required
|
||||
block is up to date then the read can complete without needing the IO
|
||||
to bring the whole page up to date.
|
||||
|
||||
is_dirty_writeback: Called by the VM when attempting to reclaim a page.
|
||||
The VM uses dirty and writeback information to determine if it needs
|
||||
to stall to allow flushers a chance to complete some IO. Ordinarily
|
||||
it can use PageDirty and PageWriteback but some filesystems have
|
||||
more complex state (unstable pages in NFS prevent reclaim) or
|
||||
do not set those flags due to locking problems (jbd). This callback
|
||||
allows a filesystem to indicate to the VM if a page should be
|
||||
treated as dirty or writeback for the purposes of stalling.
|
||||
|
||||
error_remove_page: normally set to generic_error_remove_page if truncation
|
||||
is ok for this address space. Used for memory failure handling.
|
||||
Setting this implies you deal with pages going away under you,
|
||||
|
||||
@@ -47,19 +47,12 @@ parameter. Optionally the size of the ELF header can also be passed
|
||||
when using the elfcorehdr=[size[KMG]@]offset[KMG] syntax.
|
||||
|
||||
|
||||
With the dump-capture kernel, you can access the memory image, or "old
|
||||
memory," in two ways:
|
||||
|
||||
- Through a /dev/oldmem device interface. A capture utility can read the
|
||||
device file and write out the memory in raw format. This is a raw dump
|
||||
of memory. Analysis and capture tools must be intelligent enough to
|
||||
determine where to look for the right information.
|
||||
|
||||
- Through /proc/vmcore. This exports the dump as an ELF-format file that
|
||||
you can write out using file copy commands such as cp or scp. Further,
|
||||
you can use analysis tools such as the GNU Debugger (GDB) and the Crash
|
||||
tool to debug the dump file. This method ensures that the dump pages are
|
||||
correctly ordered.
|
||||
With the dump-capture kernel, you can access the memory image through
|
||||
/proc/vmcore. This exports the dump as an ELF-format file that you can
|
||||
write out using file copy commands such as cp or scp. Further, you can
|
||||
use analysis tools such as the GNU Debugger (GDB) and the Crash tool to
|
||||
debug the dump file. This method ensures that the dump pages are correctly
|
||||
ordered.
|
||||
|
||||
|
||||
Setup and Installation
|
||||
@@ -423,18 +416,6 @@ the following command:
|
||||
|
||||
cp /proc/vmcore <dump-file>
|
||||
|
||||
You can also access dumped memory as a /dev/oldmem device for a linear
|
||||
and raw view. To create the device, use the following command:
|
||||
|
||||
mknod /dev/oldmem c 1 12
|
||||
|
||||
Use the dd command with suitable options for count, bs, and skip to
|
||||
access specific portions of the dump.
|
||||
|
||||
To see the entire memory, use the following command:
|
||||
|
||||
dd if=/dev/oldmem of=oldmem.001
|
||||
|
||||
|
||||
Analysis
|
||||
========
|
||||
|
||||
@@ -73,28 +73,44 @@ data structure. This structure includes lists of all devices and local master
|
||||
ports that form the same network. It also contains a pointer to the default
|
||||
master port that is used to communicate with devices within the network.
|
||||
|
||||
2.5 Device Drivers
|
||||
|
||||
RapidIO device-specific drivers follow Linux Kernel Driver Model and are
|
||||
intended to support specific RapidIO devices attached to the RapidIO network.
|
||||
|
||||
2.6 Subsystem Interfaces
|
||||
|
||||
RapidIO interconnect specification defines features that may be used to provide
|
||||
one or more common service layers for all participating RapidIO devices. These
|
||||
common services may act separately from device-specific drivers or be used by
|
||||
device-specific drivers. Example of such service provider is the RIONET driver
|
||||
which implements Ethernet-over-RapidIO interface. Because only one driver can be
|
||||
registered for a device, all common RapidIO services have to be registered as
|
||||
subsystem interfaces. This allows to have multiple common services attached to
|
||||
the same device without blocking attachment of a device-specific driver.
|
||||
|
||||
3. Subsystem Initialization
|
||||
---------------------------
|
||||
|
||||
In order to initialize the RapidIO subsystem, a platform must initialize and
|
||||
register at least one master port within the RapidIO network. To register mport
|
||||
within the subsystem controller driver initialization code calls function
|
||||
within the subsystem controller driver's initialization code calls function
|
||||
rio_register_mport() for each available master port.
|
||||
|
||||
RapidIO subsystem uses subsys_initcall() or device_initcall() to perform
|
||||
controller initialization (depending on controller device type).
|
||||
|
||||
After all active master ports are registered with a RapidIO subsystem,
|
||||
an enumeration and/or discovery routine may be called automatically or
|
||||
by user-space command.
|
||||
|
||||
RapidIO subsystem can be configured to be built as a statically linked or
|
||||
modular component of the kernel (see details below).
|
||||
|
||||
4. Enumeration and Discovery
|
||||
----------------------------
|
||||
|
||||
4.1 Overview
|
||||
------------
|
||||
|
||||
RapidIO subsystem configuration options allow users to specify enumeration and
|
||||
RapidIO subsystem configuration options allow users to build enumeration and
|
||||
discovery methods as statically linked components or loadable modules.
|
||||
An enumeration/discovery method implementation and available input parameters
|
||||
define how any given method can be attached to available RapidIO mports:
|
||||
@@ -115,8 +131,8 @@ several methods to initiate an enumeration and/or discovery process:
|
||||
endpoint waits for enumeration to be completed. If the specified timeout
|
||||
expires the discovery process is terminated without obtaining RapidIO network
|
||||
information. NOTE: a timed out discovery process may be restarted later using
|
||||
a user-space command as it is described later if the given endpoint was
|
||||
enumerated successfully.
|
||||
a user-space command as it is described below (if the given endpoint was
|
||||
enumerated successfully).
|
||||
|
||||
(b) Statically linked enumeration and discovery process can be started by
|
||||
a command from user space. This initiation method provides more flexibility
|
||||
@@ -138,15 +154,42 @@ When a network scan process is started it calls an enumeration or discovery
|
||||
routine depending on the configured role of a master port: host or agent.
|
||||
|
||||
Enumeration is performed by a master port if it is configured as a host port by
|
||||
assigning a host device ID greater than or equal to zero. A host device ID is
|
||||
assigned to a master port through the kernel command line parameter "riohdid=",
|
||||
or can be configured in a platform-specific manner. If the host device ID for
|
||||
a specific master port is set to -1, the discovery process will be performed
|
||||
for it.
|
||||
assigning a host destination ID greater than or equal to zero. The host
|
||||
destination ID can be assigned to a master port using various methods depending
|
||||
on RapidIO subsystem build configuration:
|
||||
|
||||
(a) For a statically linked RapidIO subsystem core use command line parameter
|
||||
"rapidio.hdid=" with a list of destination ID assignments in order of mport
|
||||
device registration. For example, in a system with two RapidIO controllers
|
||||
the command line parameter "rapidio.hdid=-1,7" will result in assignment of
|
||||
the host destination ID=7 to the second RapidIO controller, while the first
|
||||
one will be assigned destination ID=-1.
|
||||
|
||||
(b) If the RapidIO subsystem core is built as a loadable module, in addition
|
||||
to the method shown above, the host destination ID(s) can be specified using
|
||||
traditional methods of passing module parameter "hdid=" during its loading:
|
||||
- from command line: "modprobe rapidio hdid=-1,7", or
|
||||
- from modprobe configuration file using configuration command "options",
|
||||
like in this example: "options rapidio hdid=-1,7". An example of modprobe
|
||||
configuration file is provided in the section below.
|
||||
|
||||
NOTES:
|
||||
(i) if "hdid=" parameter is omitted all available mport will be assigned
|
||||
destination ID = -1;
|
||||
(ii) the "hdid=" parameter in systems with multiple mports can have
|
||||
destination ID assignments omitted from the end of list (default = -1).
|
||||
|
||||
If the host device ID for a specific master port is set to -1, the discovery
|
||||
process will be performed for it.
|
||||
|
||||
The enumeration and discovery routines use RapidIO maintenance transactions
|
||||
to access the configuration space of devices.
|
||||
|
||||
NOTE: If RapidIO switch-specific device drivers are built as loadable modules
|
||||
they must be loaded before enumeration/discovery process starts.
|
||||
This requirement is cased by the fact that enumeration/discovery methods invoke
|
||||
vendor-specific callbacks on early stages.
|
||||
|
||||
4.2 Automatic Start of Enumeration and Discovery
|
||||
------------------------------------------------
|
||||
|
||||
@@ -266,7 +309,36 @@ method's module initialization routine calls rio_register_scan() to attach
|
||||
an enumerator to a specified mport device (or devices). The basic enumerator
|
||||
implementation demonstrates this process.
|
||||
|
||||
5. References
|
||||
4.6 Using Loadable RapidIO Switch Drivers
|
||||
-----------------------------------------
|
||||
|
||||
In the case when RapidIO switch drivers are built as loadable modules a user
|
||||
must ensure that they are loaded before the enumeration/discovery starts.
|
||||
This process can be automated by specifying pre- or post- dependencies in the
|
||||
RapidIO-specific modprobe configuration file as shown in the example below.
|
||||
|
||||
File /etc/modprobe.d/rapidio.conf:
|
||||
----------------------------------
|
||||
|
||||
# Configure RapidIO subsystem modules
|
||||
|
||||
# Set enumerator host destination ID (overrides kernel command line option)
|
||||
options rapidio hdid=-1,2
|
||||
|
||||
# Load RapidIO switch drivers immediately after rapidio core module was loaded
|
||||
softdep rapidio post: idt_gen2 idtcps tsi57x
|
||||
|
||||
# OR :
|
||||
|
||||
# Load RapidIO switch drivers just before rio-scan enumerator module is loaded
|
||||
softdep rio-scan pre: idt_gen2 idtcps tsi57x
|
||||
|
||||
--------------------------
|
||||
|
||||
NOTE: In the example above, one of "softdep" commands must be removed or
|
||||
commented out to keep required module loading sequence.
|
||||
|
||||
A. References
|
||||
-------------
|
||||
|
||||
[1] RapidIO Trade Association. RapidIO Interconnect Specifications.
|
||||
|
||||
@@ -40,6 +40,7 @@ device_rev - returns the device revision level
|
||||
(see 4.1 for switch specific details)
|
||||
lprev - returns name of previous device (switch) on the path to the device
|
||||
that that owns this attribute
|
||||
modalias - returns the device modalias
|
||||
|
||||
In addition to the files listed above, each device has a binary attribute file
|
||||
that allows read/write access to the device configuration registers using
|
||||
|
||||
@@ -153,9 +153,10 @@ since_epoch: The number of seconds since the epoch according to the RTC
|
||||
time: RTC-provided time
|
||||
wakealarm: The time at which the clock will generate a system wakeup
|
||||
event. This is a one shot wakeup event, so must be reset
|
||||
after wake if a daily wakeup is required. Format is either
|
||||
seconds since the epoch or, if there's a leading +, seconds
|
||||
in the future.
|
||||
after wake if a daily wakeup is required. Format is seconds since
|
||||
the epoch by default, or if there's a leading +, seconds in the
|
||||
future, or if there is a leading +=, seconds ahead of the current
|
||||
alarm.
|
||||
|
||||
IOCTL INTERFACE
|
||||
---------------
|
||||
|
||||
@@ -15,7 +15,8 @@ There are three components to pagemap:
|
||||
* Bits 0-54 page frame number (PFN) if present
|
||||
* Bits 0-4 swap type if swapped
|
||||
* Bits 5-54 swap offset if swapped
|
||||
* Bits 55-60 page shift (page size = 1<<page shift)
|
||||
* Bit 55 pte is soft-dirty (see Documentation/vm/soft-dirty.txt)
|
||||
* Bits 56-60 zero
|
||||
* Bit 61 page is file-page or shared-anon
|
||||
* Bit 62 page swapped
|
||||
* Bit 63 page present
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
SOFT-DIRTY PTEs
|
||||
|
||||
The soft-dirty is a bit on a PTE which helps to track which pages a task
|
||||
writes to. In order to do this tracking one should
|
||||
|
||||
1. Clear soft-dirty bits from the task's PTEs.
|
||||
|
||||
This is done by writing "4" into the /proc/PID/clear_refs file of the
|
||||
task in question.
|
||||
|
||||
2. Wait some time.
|
||||
|
||||
3. Read soft-dirty bits from the PTEs.
|
||||
|
||||
This is done by reading from the /proc/PID/pagemap. The bit 55 of the
|
||||
64-bit qword is the soft-dirty one. If set, the respective PTE was
|
||||
written to since step 1.
|
||||
|
||||
|
||||
Internally, to do this tracking, the writable bit is cleared from PTEs
|
||||
when the soft-dirty bit is cleared. So, after this, when the task tries to
|
||||
modify a page at some virtual address the #PF occurs and the kernel sets
|
||||
the soft-dirty bit on the respective PTE.
|
||||
|
||||
Note, that although all the task's address space is marked as r/o after the
|
||||
soft-dirty bits clear, the #PF-s that occur after that are processed fast.
|
||||
This is so, since the pages are still mapped to physical memory, and thus all
|
||||
the kernel does is finds this fact out and puts both writable and soft-dirty
|
||||
bits on the PTE.
|
||||
|
||||
|
||||
This feature is actively used by the checkpoint-restore project. You
|
||||
can find more details about it on http://criu.org
|
||||
|
||||
|
||||
-- Pavel Emelyanov, Apr 9, 2013
|
||||
+7
-3
@@ -1617,6 +1617,7 @@ F: drivers/net/wireless/b43legacy/
|
||||
|
||||
BACKLIGHT CLASS/SUBSYSTEM
|
||||
M: Richard Purdie <rpurdie@rpsys.net>
|
||||
M: Jingoo Han <jg1.han@samsung.com>
|
||||
S: Maintained
|
||||
F: drivers/video/backlight/
|
||||
F: include/linux/backlight.h
|
||||
@@ -5974,8 +5975,10 @@ M: Willem Riede <osst@riede.org>
|
||||
L: osst-users@lists.sourceforge.net
|
||||
L: linux-scsi@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/scsi/osst*
|
||||
F: drivers/scsi/st*
|
||||
F: Documentation/scsi/osst.txt
|
||||
F: drivers/scsi/osst.*
|
||||
F: drivers/scsi/osst_*.h
|
||||
F: drivers/scsi/st.h
|
||||
|
||||
OPENCORES I2C BUS DRIVER
|
||||
M: Peter Korsgaard <jacmet@sunsite.dk>
|
||||
@@ -7133,7 +7136,8 @@ M: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
|
||||
L: linux-scsi@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/scsi/st.txt
|
||||
F: drivers/scsi/st*
|
||||
F: drivers/scsi/st.*
|
||||
F: drivers/scsi/st_*.h
|
||||
|
||||
SCTP PROTOCOL
|
||||
M: Vlad Yasevich <vyasevich@gmail.com>
|
||||
|
||||
@@ -365,6 +365,9 @@ config HAVE_IRQ_TIME_ACCOUNTING
|
||||
config HAVE_ARCH_TRANSPARENT_HUGEPAGE
|
||||
bool
|
||||
|
||||
config HAVE_ARCH_SOFT_DIRTY
|
||||
bool
|
||||
|
||||
config HAVE_MOD_ARCH_SPECIFIC
|
||||
bool
|
||||
help
|
||||
|
||||
@@ -71,8 +71,6 @@ PLAT_NODE_DATA_LOCALNR(unsigned long p, int n)
|
||||
|
||||
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
|
||||
|
||||
#define VALID_PAGE(page) (((page) - mem_map) < max_mapnr)
|
||||
|
||||
#define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> 32))
|
||||
#define pgd_page(pgd) (pfn_to_page(pgd_val(pgd) >> 32))
|
||||
#define pte_pfn(pte) (pte_val(pte) >> 32)
|
||||
|
||||
@@ -238,8 +238,8 @@ nautilus_init_pci(void)
|
||||
if (pci_mem < memtop)
|
||||
memtop = pci_mem;
|
||||
if (memtop > alpha_mv.min_mem_address) {
|
||||
free_reserved_area((unsigned long)__va(alpha_mv.min_mem_address),
|
||||
(unsigned long)__va(memtop), 0, NULL);
|
||||
free_reserved_area(__va(alpha_mv.min_mem_address),
|
||||
__va(memtop), -1, NULL);
|
||||
printk("nautilus_init_pci: %ldk freed\n",
|
||||
(memtop - alpha_mv.min_mem_address) >> 10);
|
||||
}
|
||||
|
||||
+5
-36
@@ -276,56 +276,25 @@ srm_paging_stop (void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_DISCONTIGMEM
|
||||
static void __init
|
||||
printk_memory_info(void)
|
||||
{
|
||||
unsigned long codesize, reservedpages, datasize, initsize, tmp;
|
||||
extern int page_is_ram(unsigned long) __init;
|
||||
|
||||
/* printk all informations */
|
||||
reservedpages = 0;
|
||||
for (tmp = 0; tmp < max_low_pfn; tmp++)
|
||||
/*
|
||||
* Only count reserved RAM pages
|
||||
*/
|
||||
if (page_is_ram(tmp) && PageReserved(mem_map+tmp))
|
||||
reservedpages++;
|
||||
|
||||
codesize = (unsigned long) &_etext - (unsigned long) &_text;
|
||||
datasize = (unsigned long) &_edata - (unsigned long) &_data;
|
||||
initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
|
||||
|
||||
printk("Memory: %luk/%luk available (%luk kernel code, %luk reserved, %luk data, %luk init)\n",
|
||||
nr_free_pages() << (PAGE_SHIFT-10),
|
||||
max_mapnr << (PAGE_SHIFT-10),
|
||||
codesize >> 10,
|
||||
reservedpages << (PAGE_SHIFT-10),
|
||||
datasize >> 10,
|
||||
initsize >> 10);
|
||||
}
|
||||
|
||||
void __init
|
||||
mem_init(void)
|
||||
{
|
||||
max_mapnr = num_physpages = max_low_pfn;
|
||||
totalram_pages += free_all_bootmem();
|
||||
set_max_mapnr(max_low_pfn);
|
||||
high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
|
||||
|
||||
printk_memory_info();
|
||||
free_all_bootmem();
|
||||
mem_init_print_info(NULL);
|
||||
}
|
||||
#endif /* CONFIG_DISCONTIGMEM */
|
||||
|
||||
void
|
||||
free_initmem(void)
|
||||
{
|
||||
free_initmem_default(0);
|
||||
free_initmem_default(-1);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BLK_DEV_INITRD
|
||||
void
|
||||
free_initrd_mem(unsigned long start, unsigned long end)
|
||||
{
|
||||
free_reserved_area(start, end, 0, "initrd");
|
||||
free_reserved_area((void *)start, (void *)end, -1, "initrd");
|
||||
}
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user