<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/asm-um, branch v2.6.26.4</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/include/asm-um?h=v2.6.26.4</id>
<link rel='self' href='https://git.amat.us/linux/atom/include/asm-um?h=v2.6.26.4'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2008-06-06T18:36:22Z</updated>
<entry>
<title>uml: activate_mm: remove the dead PF_BORROWED_MM check</title>
<updated>2008-06-06T18:36:22Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@tv-sign.ru</email>
</author>
<published>2008-06-06T18:31:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=aab2545fdd6641b76af0ae96456c4ca9d1e50dad'/>
<id>urn:sha1:aab2545fdd6641b76af0ae96456c4ca9d1e50dad</id>
<content type='text'>
use_mm() was changed to use switch_mm() instead of activate_mm(), since
then nobody calls (and nobody should call) activate_mm() with
PF_BORROWED_MM bit set.

As Jeff Dike pointed out, we can also remove the "old != new" check, it is
always true.

Signed-off-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Cc: Jeff Dike &lt;jdike@addtoit.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>asm-{alpha,h8300,um,v850,xtensa}/param.h: unbreak HZ for userspace</title>
<updated>2008-05-15T02:11:14Z</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@gentoo.org</email>
</author>
<published>2008-05-14T23:05:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b7cffc1f29c1bc729bc50c863c87f93f9b70994b'/>
<id>urn:sha1:b7cffc1f29c1bc729bc50c863c87f93f9b70994b</id>
<content type='text'>
I noticed this because alpha was broken due to the recent commit commit
bdc807871d58285737d50dc6163d0feb72cb0dc2 ("avoid overflows in
kernel/time.c").  Most arches do something like this in their
asm/param.h:

#ifdef __KERNEL__
# define HZ CONFIG_HZ
#else
# define HZ 100
#endif

A few arches though (namely alpha/h8300/um/v850/xtensa) either do no set
HZ at all for !__KERNEL__, or they set it wrongly.  This should bring all
arches in line by setting up HZ for userspace.

Without this currently perl 5.10 doesn't build on alpha:

perl.c: In function 'perl_construct':
perl.c:388: error: 'CONFIG_HZ' undeclared (first use in this function)
-&gt; http://buildd.debian.org/fetch.cgi?pkg=perl;ver=5.10.0-10;arch=alpha;stamp=1210252894

Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Cc: Richard Henderson &lt;rth@twiddle.net&gt;
Cc: Ivan Kokshaysky &lt;ink@jurassic.park.msu.ru&gt;
Cc: Yoshinori Sato &lt;ysato@users.sourceforge.jp&gt;
Cc: Jeff Dike &lt;jdike@addtoit.com&gt;
Cc: Chris Zankel &lt;chris@zankel.net&gt;
Cc: maximilian attems &lt;max@stro.at&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
[ HZ on alpha is 1024 for historical reasons.  - Linus ]
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>uml: random driver fixes</title>
<updated>2008-05-13T15:02:22Z</updated>
<author>
<name>Jeff Dike</name>
<email>jdike@addtoit.com</email>
</author>
<published>2008-05-12T21:01:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5d33e4d7fd9a52d2673e5c730eab81856e100a74'/>
<id>urn:sha1:5d33e4d7fd9a52d2673e5c730eab81856e100a74</id>
<content type='text'>
The random driver would essentially hang if the host's /dev/random returned
-EAGAIN.  There was a test of need_resched followed by a schedule inside the
loop, but that didn't help and it's the wrong way to work anyway.

The right way is to ask for an interrupt when there is input available from
the host and handle it then rather than polling.

Now, when the host's /dev/random returns -EAGAIN, the driver asks for a wakeup
when there's randomness available again and sleeps.  The interrupt routine
just wakes up whatever processes are sleeping on host_read_wait.

There is an atomic_t, host_sleep_count, which counts the number of processes
waiting for randomness.  When this reaches zero, the interrupt is disabled.

An added complication is that async I/O notification was only recently added
to /dev/random (by me), so essentially all hosts will lack it.  So, we use the
sigio workaround here, which is to have a separate thread poll on the
descriptor and send an interrupt when there is input on it.  This mechanism is
activated when a process gets -EAGAIN (activating this multiple times is
harmless, if a bit wasteful) and deactivated by the last process still
waiting.

The module name was changed from "random" to "hw_random" in order for udev to
recognize it.

The sigio workaround needed some changes.  sigio_broken was added for cases
when we know that async notification doesn't work.  This is now called from
maybe_sigio_broken, which deals with pts devices.

Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>uml: use PAGE_SIZE in linker scripts</title>
<updated>2008-05-13T15:02:22Z</updated>
<author>
<name>Cyrill Gorcunov</name>
<email>gorcunov@gmail.com</email>
</author>
<published>2008-05-12T21:01:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a7dfa9403bf3b03899d5ef5d10b0c5c3f74b0682'/>
<id>urn:sha1:a7dfa9403bf3b03899d5ef5d10b0c5c3f74b0682</id>
<content type='text'>
This patch includes page.h header into linker scripts that allow us to
use PAGE_SIZE macro instead of numeric constant.

To be able to include page.h into linker scripts page.h is needed for
some modification - i.e.  we need to use __ASSEMBLY__ and _AC macro

[jdike@linux.intel.com - fixed conflict with as-layout.h]
Signed-off-by: Cyrill Gorcunov &lt;gorcunov@gmail.com&gt;
Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&gt;
Cc: WANG Cong &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>uml: remove unused header</title>
<updated>2008-05-13T15:02:22Z</updated>
<author>
<name>Jeff Dike</name>
<email>jdike@addtoit.com</email>
</author>
<published>2008-05-12T21:01:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=309e96cdf2f2c1a071102e8bdf828a3493e6e50a'/>
<id>urn:sha1:309e96cdf2f2c1a071102e8bdf828a3493e6e50a</id>
<content type='text'>
From: Adrian Bunk &lt;bunk@kernel.org&gt;

This patch removes the unused and broken (the normal asm/keyboard.h
files no longer exists) include/asm-um/keyboard.h

Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&gt;
Cc: WANG Cong &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>rename div64_64 to div64_u64</title>
<updated>2008-05-01T15:03:58Z</updated>
<author>
<name>Roman Zippel</name>
<email>zippel@linux-m68k.org</email>
</author>
<published>2008-05-01T11:34:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6f6d6a1a6a1336431a6cba60ace9e97c3a496a19'/>
<id>urn:sha1:6f6d6a1a6a1336431a6cba60ace9e97c3a496a19</id>
<content type='text'>
Rename div64_64 to div64_u64 to make it consistent with the other divide
functions, so it clearly includes the type of the divide.  Move its definition
to math64.h as currently no architecture overrides the generic implementation.
 They can still override it of course, but the duplicated declarations are
avoided.

Signed-off-by: Roman Zippel &lt;zippel@linux-m68k.org&gt;
Cc: Avi Kivity &lt;avi@qumranet.com&gt;
Cc: Russell King &lt;rmk@arm.linux.org.uk&gt;
Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Jeff Dike &lt;jdike@addtoit.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kernel: Move arches to use common unaligned access</title>
<updated>2008-04-29T15:06:27Z</updated>
<author>
<name>Harvey Harrison</name>
<email>harvey.harrison@gmail.com</email>
</author>
<published>2008-04-29T08:03:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6510d41954dc6a9c8b1dbca7eaca0f23195ca727'/>
<id>urn:sha1:6510d41954dc6a9c8b1dbca7eaca0f23195ca727</id>
<content type='text'>
Unaligned access is ok for the following arches:
cris, m68k, mn10300, powerpc, s390, x86

Arches that use the memmove implementation for native endian, and
the byteshifting for the opposite endianness.
h8300, m32r, xtensa

Packed struct for native endian, byteshifting for other endian:
alpha, blackfin, ia64, parisc, sparc, sparc64, mips, sh

m86knommu is generic_be for Coldfire, otherwise unaligned access is ok.

frv, arm chooses endianness based on compiler settings, uses the byteshifting
versions.  Remove the unaligned trap handler from frv as it is now unused.

v850 is le, uses the byteshifting versions for both be and le.

Remove the now unused asm-generic implementation.

Signed-off-by: Harvey Harrison &lt;harvey.harrison@gmail.com&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Cc: &lt;linux-arch@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm: introduce pte_special pte bit</title>
<updated>2008-04-28T15:58:23Z</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@suse.de</email>
</author>
<published>2008-04-28T09:13:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7e675137a8e1a4d45822746456dd389b65745bf6'/>
<id>urn:sha1:7e675137a8e1a4d45822746456dd389b65745bf6</id>
<content type='text'>
s390 for one, cannot implement VM_MIXEDMAP with pfn_valid, due to their memory
model (which is more dynamic than most).  Instead, they had proposed to
implement it with an additional path through vm_normal_page(), using a bit in
the pte to determine whether or not the page should be refcounted:

vm_normal_page()
{
	...
        if (unlikely(vma-&gt;vm_flags &amp; (VM_PFNMAP|VM_MIXEDMAP))) {
                if (vma-&gt;vm_flags &amp; VM_MIXEDMAP) {
#ifdef s390
			if (!mixedmap_refcount_pte(pte))
				return NULL;
#else
                        if (!pfn_valid(pfn))
                                return NULL;
#endif
                        goto out;
                }
	...
}

This is fine, however if we are allowed to use a bit in the pte to determine
refcountedness, we can use that to _completely_ replace all the vma based
schemes.  So instead of adding more cases to the already complex vma-based
scheme, we can have a clearly seperate and simple pte-based scheme (and get
slightly better code generation in the process):

vm_normal_page()
{
#ifdef s390
	if (!mixedmap_refcount_pte(pte))
		return NULL;
	return pte_page(pte);
#else
	...
#endif
}

And finally, we may rather make this concept usable by any architecture rather
than making it s390 only, so implement a new type of pte state for this.
Unfortunately the old vma based code must stay, because some architectures may
not be able to spare pte bits.  This makes vm_normal_page a little bit more
ugly than we would like, but the 2 cases are clearly seperate.

So introduce a pte_special pte state, and use it in mm/memory.c.  It is
currently a noop for all architectures, so this doesn't actually result in any
compiled code changes to mm/memory.o.

BTW:
I haven't put vm_normal_page() into arch code as-per an earlier suggestion.
The reason is that, regardless of where vm_normal_page is actually
implemented, the *abstraction* is still exactly the same. Also, while it
depends on whether the architecture has pte_special or not, that is the
only two possible cases, and it really isn't an arch specific function --
the role of the arch code should be to provide primitive functions and
accessors with which to build the core code; pte_special does that. We do
not want architectures to know or care about vm_normal_page itself, and
we definitely don't want them being able to invent something new there
out of sight of mm/ code. If we made vm_normal_page an arch function, then
we have to make vm_insert_mixed (next patch) an arch function too. So I
don't think moving it to arch code fundamentally improves any abstractions,
while it does practically make the code more difficult to follow, for both
mm and arch developers, and easier to misuse.

[akpm@linux-foundation.org: build fix]
Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Acked-by: Carsten Otte &lt;cotte@de.ibm.com&gt;
Cc: Jared Hulbert &lt;jaredeh@gmail.com&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Generic semaphore implementation</title>
<updated>2008-04-17T14:42:34Z</updated>
<author>
<name>Matthew Wilcox</name>
<email>matthew@wil.cx</email>
</author>
<published>2008-03-08T02:55:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=64ac24e738823161693bf791f87adc802cf529ff'/>
<id>urn:sha1:64ac24e738823161693bf791f87adc802cf529ff</id>
<content type='text'>
Semaphores are no longer performance-critical, so a generic C
implementation is better for maintainability, debuggability and
extensibility.  Thanks to Peter Zijlstra for fixing the lockdep
warning.  Thanks to Harvey Harrison for pointing out that the
unlikely() was unnecessary.

Signed-off-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>uml: compile error fix</title>
<updated>2008-04-16T02:35:40Z</updated>
<author>
<name>WANG Cong</name>
<email>xiyou.wangcong@gmail.com</email>
</author>
<published>2008-04-15T21:34:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1f4deba80a0d9fa92832684e683335b742a530e8'/>
<id>urn:sha1:1f4deba80a0d9fa92832684e683335b742a530e8</id>
<content type='text'>
This patch fixes this error:

In file included from /home/wangcong/projects/linux-2.6/arch/um/kernel/smp.c:9:
include2/asm/tlb.h: In function `tlb_remove_page':
include2/asm/tlb.h:101: error: implicit declaration of function `page_cache_release'

And since including &lt;linux/pagemap.h&gt; in &lt;linux/swap.h&gt; will break sparc,
we add this #include in uml's own header.

Acked-by: Jeff Dike &lt;jdike@addtoit.com&gt;
Signed-off-by: WANG Cong &lt;wangcong@zeuux.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
