All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: How to free devices held captive by failed arrays
From: Harry Mangalam @ 2011-10-21 23:08 UTC (permalink / raw)
  To: NeilBrown, linux-raid
In-Reply-To: <20111022100457.0f5133f3@notabene.brown>

> > > > 
> > > > 
> > > > What do I have to do to free this device?
> > > 
> > > Doesn't
> > >  
> > >    mdadm --stop /dev/md_d0
> > > 
> > > release sdg1 ??
> > > 
> > > NeilBrown
> > 
> > No, it doesn't.
> > 
> > $ mdadm --stop /dev/md_d0
> > mdadm: error opening /dev/md_d0: No such file or directory
> > 
> > In fact, that's sort of odd:
> > 
> >  $ ls -l /dev/md*
> > brw-rw---- 1 root disk 9, 0 2011-10-20 17:18 /dev/md0
> > lrwxrwxrwx 1 root root    7 2011-10-20 17:05 /dev/md_d0p1 -> md/d0p1
> > lrwxrwxrwx 1 root root    7 2011-10-20 17:05 /dev/md_d0p2 -> md/d0p2
> > lrwxrwxrwx 1 root root    7 2011-10-20 17:05 /dev/md_d0p3 -> md/d0p3
> > lrwxrwxrwx 1 root root    7 2011-10-20 17:05 /dev/md_d0p4 -> md/d0p4
> > 
> > /dev/md:
> > total 0
> > brw------- 1 root root 254, 0 2011-10-20 17:05 d0
> > brw------- 1 root root 254, 1 2011-10-20 17:05 d0p1
> > brw------- 1 root root 254, 2 2011-10-20 17:05 d0p2
> > brw------- 1 root root 254, 3 2011-10-20 17:05 d0p3
> > brw------- 1 root root 254, 4 2011-10-20 17:05 d0p4
> > 
> > [no record of /dev/md_d0] ...?
> > 
> > hjm
> > 
> 
> md_d0 is another name for md/d0.  The former probably only gets created when
> the array becomes active.
> So use
>    mdadm --stop /dev/md/d0


Perfect!  That did it.  The other RAID is now initializing.
That goes in the personal HowTos..
Many thanks!

hjm


^ permalink raw reply

* [U-Boot] [PATCH v2 1/4] macb: initial support for Cadence GEM
From: Wolfgang Denk @ 2011-10-21 23:07 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <1318251753-23604-1-git-send-email-fovsoft@gmail.com>

Dear Dave Aldridge,

In message <1318251753-23604-1-git-send-email-fovsoft@gmail.com> you wrote:
> The Cadence GEM is based on the MACB Ethernet controller but has a few
> small changes with regards to register and bitfield placement.  This
> patch detects the presence of a GEM by reading the module ID register
> and setting a flag appropriately.
> 
> This handles the new HW address, USRIO and hash register base register
> locations in GEM.
> 
> Signed-off-by: Dave Aldridge <fovsoft@gmail.com>
...
> --- a/drivers/net/macb.h
> +++ b/drivers/net/macb.h
> @@ -71,6 +71,15 @@
>  #define MACB_TPQ				0x00bc
>  #define MACB_USRIO				0x00c0
>  #define MACB_WOL				0x00c4
> +#define MACB_MID				0x00fc
> +
> +/* GEM register offsets. */
> +#define GEM_NCFGR				0x0004
> +#define GEM_USRIO				0x000c
> +#define GEM_HRB					0x0080
> +#define GEM_HRT					0x0084
> +#define GEM_SA1B				0x0088
> +#define GEM_SA1T				0x008C

NAK.

>  /* Register access macros */
>  #define macb_readl(port,reg)				\
>  	readl((port)->regs + MACB_##reg)
>  #define macb_writel(port,reg,value)			\
>  	writel((value), (port)->regs + MACB_##reg)
> +#define gem_readl(port, reg)				\
> +	__raw_readl((port)->regs + GEM_##reg)
> +#define gem_writel(port, reg, value)			\
> +	__raw_writel((value), (port)->regs + GEM_##reg)

NAK.  We don't allow regoister accesses through base address + offset
notation any more.

Please use a C struct instead.



Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Today is the yesterday you worried about tomorrow.

^ permalink raw reply

* Re: Linux as Bootloader
From: Geoff Levand @ 2011-10-21 23:07 UTC (permalink / raw)
  To: Christian Gmeiner; +Cc: linux-kernel
In-Reply-To: <CAH9NwWenTowswTCrrosA09D=LNF7Ej-JGNQjVxT20puA_KQ_XQ@mail.gmail.com>

Hi Christian,

On 09/16/2011 04:02 AM, Christian Gmeiner wrote:
> 2011/9/11 Geoff Levand <geoff@infradead.org>:
>> On 09/05/2011 01:24 AM, Christian Gmeiner wrote:
>>> I am using the linux kernel in combination with busybox and a separate
>>> bootloader app to
>>> startup a x86 based embedded device.
>>
>> Just FYI, Petitboot, a kexec base bootloader, does the same
>> thing as what you have done.
>>
>> I'm now working on adding a twin GUI program and an x86 OpenWRT build.
> 
> Petitboot sounds nice, but kernel.org is down. Is there an other way to get
> access to it via git?

Just FYI, my petitboot repo at kernel.org is back:

  http://git.kernel.org/?p=linux/kernel/git/geoff/petitboot.git

Also, I put a preliminary version of new Web pages I'm
working on here:

  http://bombadil.infradead.org/~geoff/petitboot/

-Geoff

  


^ permalink raw reply

* Re: How to free devices held captive by failed arrays
From: NeilBrown @ 2011-10-21 23:04 UTC (permalink / raw)
  To: Harry Mangalam; +Cc: linux-raid
In-Reply-To: <20111021224556.GA11429@moo.nac.uci.edu>

[-- Attachment #1: Type: text/plain, Size: 3767 bytes --]

On Fri, 21 Oct 2011 15:45:56 -0700 Harry Mangalam <hjm@moo.nac.uci.edu> wrote:

> [continues at bottom]
> 
> On Sat, Oct 22, 2011 at 09:41:56AM +1100, NeilBrown wrote:
> > > 
> > > In doing some tests with an 8-port Supermicro/Marvell-based SATA controller
> > > (works fine so far) and some Hitachi 3TB disks, I've run into an odd
> > > problem.  One of the disks failed in burn-in, so the RAID5 went into
> > > degraded mode.  In replacing the failed disk, I managed to bugger it up; not
> > > so awful since it's a test rig and I needed to create 2 smaller arrays for
> > > some testing. 
> > > 
> > > 
> > > In trying to do that, I was able to create the first 4-disk RAID5 fine and
> > > it's now initializing, but the second fails with the following error:
> > > 
> > > 
> > > $ mdadm --create  --verbose /dev/md1 --level=5 --raid-devices=4
> > > /dev/sd[fghi]1
> > > mdadm: layout defaults to left-symmetric
> > > mdadm: layout defaults to left-symmetric
> > > mdadm: chunk size defaults to 512K
> > > mdadm: /dev/sdf1 appears to be part of a raid array:
> > >     level=raid5 devices=7 ctime=Fri Sep 30 17:47:19 2011
> > > mdadm: layout defaults to left-symmetric
> > > mdadm: super1.x cannot open /dev/sdg1: Device or resource busy
> > > mdadm: /dev/sdg1 is not suitable for this array.
> > > mdadm: layout defaults to left-symmetric
> > > mdadm: /dev/sdh1 appears to be part of a raid array:
> > >     level=raid5 devices=7 ctime=Fri Sep 30 17:47:19 2011
> > > mdadm: layout defaults to left-symmetric
> > > mdadm: create aborted
> > > 
> > > 
> > > mdstat implies that one of the disks still belongs to the previous RAID5:
> > > 
> > > 
> > > $ cat /proc/mdstat 
> > > Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4]
> > > [raid10] 
> > > md0 : active raid5 sde1[4] sdd1[2] sdc1[1] sdb1[0]
> > >       6442438656 blocks super 1.2 level 5, 512k chunk, algorithm 2 [4/3]
> > > [UUU_]
> > >       [========>............]  recovery = 40.1% (861382528/2147479552)
> > > finish=292.9min speed=73167K/sec
> > >       
> > > md_d0 : inactive sdg1[5](S)
> > >       2147480704 blocks
> > >        
> > > unused devices: <none>
> > > 
> > > 
> > > 
> > > 
> > > but I can't seem to convince md_d0 to surrender this device.  This behavior
> > > survives a reboot.
> > > 
> > > 
> > > One wrinkle is that the original RAID was made with the default mdadm from
> > > Ubuntu 10.04.3 (2.6.7.1) and the smaller RAID5 above was created with the
> > > latest mdadm (v3.2.2).  
> > > 
> > > 
> > > What do I have to do to free this device?
> > 
> > Doesn't
> >  
> >    mdadm --stop /dev/md_d0
> > 
> > release sdg1 ??
> > 
> > NeilBrown
> 
> No, it doesn't.
> 
> $ mdadm --stop /dev/md_d0
> mdadm: error opening /dev/md_d0: No such file or directory
> 
> In fact, that's sort of odd:
> 
>  $ ls -l /dev/md*
> brw-rw---- 1 root disk 9, 0 2011-10-20 17:18 /dev/md0
> lrwxrwxrwx 1 root root    7 2011-10-20 17:05 /dev/md_d0p1 -> md/d0p1
> lrwxrwxrwx 1 root root    7 2011-10-20 17:05 /dev/md_d0p2 -> md/d0p2
> lrwxrwxrwx 1 root root    7 2011-10-20 17:05 /dev/md_d0p3 -> md/d0p3
> lrwxrwxrwx 1 root root    7 2011-10-20 17:05 /dev/md_d0p4 -> md/d0p4
> 
> /dev/md:
> total 0
> brw------- 1 root root 254, 0 2011-10-20 17:05 d0
> brw------- 1 root root 254, 1 2011-10-20 17:05 d0p1
> brw------- 1 root root 254, 2 2011-10-20 17:05 d0p2
> brw------- 1 root root 254, 3 2011-10-20 17:05 d0p3
> brw------- 1 root root 254, 4 2011-10-20 17:05 d0p4
> 
> [no record of /dev/md_d0] ...?
> 
> hjm
> 

md_d0 is another name for md/d0.  The former probably only gets created when
the array becomes active.
So use
   mdadm --stop /dev/md/d0

NeilBrown


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply

* [GIT PULL] DEBUG_LL platform updates for 3.2
From: Rob Herring @ 2011-10-21 23:04 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <4EA1B3D5.9070802@gmail.com>

On 10/21/2011 01:03 PM, Rob Herring wrote:
> On 10/21/2011 10:15 AM, Will Deacon wrote:
>> Hi Rob,
>>
>> On Fri, Oct 21, 2011 at 03:48:24PM +0100, Rob Herring wrote:
>>> On 10/21/2011 05:59 AM, Will Deacon wrote:
>>>> 2. The GIC is hosed on versatile express. Reverting e3f14d3 ("ARM: gic: add
>>>>    OF based initialization") and 2071a2a4 ("ARM: gic: add irq_domain support")
>>>>    allows me to boot again.

[snip]

>> [    0.000000] SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
>> [    0.000000] Preemptible hierarchical RCU implementation.
>> [    0.000000] NR_IRQS:128 nr_irqs:128 128
> 
> It is working for me. You're booting with sparse irq. ARM's support of
> sparse irq is essentially broken. It does not sparsely allocate
> irq_descs, but allocates all nr_irqs irq_descs.
> 
> The following patch fixes things and is more in line with other arch's
> implementations of arch_probe_nr_irqs. I need to fix mnp platforms
> still. Any platform that enables sparse irq needs to either set
> machine_desc->nr_irqs or properly call irq_alloc_descs.
> 
> Rob
> 
> From: Rob Herring <rob.herring@calxeda.com>
> Date: Tue, 13 Sep 2011 15:08:37 -0500
> Subject: [PATCH] ARM: fix sparse irq pre-allocations
> 
> Returning NR_IRQS in arch_probe_nr_irqs makes SPARSE_IRQ behave the same as
> !SPARSE_IRQ in that NR_IRQ irqdescs are allocated. There is some advantage
> that NR_IRQ is run-time vs. compile time, but sparse irq is crippled on
> ARM. With irqdomains, each interrupt controller should allocate the
> irqdescs that it needs.
> 
> If machine_desc->nr_irqs is set, then the irqdescs will be pre-allocated.
> If the default NR_IRQS is used then no irqdescs will be pre-allocated.
> 
> Perhaps 0-16 should be reserved for IPIs on SMP?
> 
> There are 3 users of SPARSE_IRQ: pxa, mnp, and shmobile. shmobile is the
> only platform that correctly allocates irqdescs. This commit will break
> mnp platforms which don't set nr_irqs.
> 
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> ---
>  arch/arm/kernel/irq.c |    7 +++++--
>  1 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
> index de3dcab..b32f438 100644
> --- a/arch/arm/kernel/irq.c
> +++ b/arch/arm/kernel/irq.c
> @@ -133,8 +133,11 @@ void __init init_IRQ(void)
>  #ifdef CONFIG_SPARSE_IRQ
>  int __init arch_probe_nr_irqs(void)
>  {
> -	nr_irqs = machine_desc->nr_irqs ? machine_desc->nr_irqs : NR_IRQS;
> -	return nr_irqs;
> +	if (machine_desc->nr_irqs) {
> +		nr_irqs = machine_desc->nr_irqs;
> +		return nr_irqs;
> +	}
> +	return 0;
>  }
>  #endif
> 

While I think this is the right fix, this will break platforms which
don't set nr_irqs or have a mixture of irq_chips with and without
explicit irq_desc allocations (and SPARSE_IRQ on). There is a more
simple fix I'm working on to set machine_desc->nr_irqs to NR_IRQ_LEGACY
on all machines with a gic.

Rob

^ permalink raw reply

* [U-Boot] [PATCH V4] drivers: add the support for Silicon Image SATA controller
From: Wolfgang Denk @ 2011-10-21 23:04 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <1318051618-18957-1-git-send-email-b29983@freescale.com>

Dear b29983 at freescale.com,

In message <1318051618-18957-1-git-send-email-b29983@freescale.com> you wrote:
> From: Tang Yuantian <B29983@freescale.com>
> 
> Add the Silicon Image series PCI Express to
> Serial ATA controller support, including Sil3132,
> Sil3131 and Sil3124.
> The SATA controller can be used to load kernel.
> 
> The features list:
> 	- Supports 1-lane 2.5 Gbit/s PCI Express
> 	- Supports one/two/four independent Serial ATA channels
> 	- Supports Serial ATA Generation 2 transfer rate of 3.0 Gbit/s
> 	- Supports LBA28 and LBA48
> 
> Signed-off-by: Tang Yuantian <b29983@freescale.com>
> Signed-off-by: Aaron Williams <Aaron.Williams@cavium.com>
> Tested-by: Lan Chunhe <b25806@freescale.com>
> ---
> git tree: git://git.denx.de/u-boot.git
> branch: master
> Test platform:P1022DS, P4080DS
> V4: 
> 	- fix checkpatch warning:
> 	WARNING: externs should be avoided in .c files
> 	#90: FILE: drivers/block/sata_sil.c:37:
> 	+extern block_dev_desc_t sata_dev_desc[CONFIG_SYS_SATA_MAX_DEVICE];
> V3: 
> 	- remove __IOMEM
> 	- remove force cast
> V2:
> 	- add virt_to_bus to translate address
> 	- fix some issues
> 
>  drivers/block/Makefile   |    1 +
>  drivers/block/sata_sil.c |  722 ++++++++++++++++++++++++++++++++++++++++++++++
>  drivers/block/sata_sil.h |  229 +++++++++++++++
>  include/pci_ids.h        |    5 +
>  4 files changed, 957 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/block/sata_sil.c
>  create mode 100644 drivers/block/sata_sil.h

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
In C we had to code our own bugs, in C++ we can inherit them.

^ permalink raw reply

* [U-Boot] [PATCH RESEND] FAT: Add FAT write feature
From: Wolfgang Denk @ 2011-10-21 22:59 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <1317973947-1312-1-git-send-email-dg77.kim@samsung.com>

Dear Donggeun Kim,

In message <1317973947-1312-1-git-send-email-dg77.kim@samsung.com> you wrote:
> In some cases, saving data in RAM as a file with FAT format is required.
> This patch allows the file to be written in FAT formatted partition.
> 
> The usage is similar with reading a file.
> First, fat_register_device function is called before file_fat_write function
> in order to set target partition.
> Then, file_fat_write function is invoked with desired file name,
> start ram address for writing data, and file size.
> 
> Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
>  fs/fat/Makefile    |    1 +
>  fs/fat/fat.c       |    2 +
>  fs/fat/fat_write.c | 1091 ++++++++++++++++++++++++++++++++++++++++++++++++++++
>  include/fat.h      |    3 +
>  4 files changed, 1097 insertions(+), 0 deletions(-)
>  create mode 100644 fs/fat/fat_write.c
> 
> diff --git a/fs/fat/Makefile b/fs/fat/Makefile
> index 93b6f07..9635d36 100644
> --- a/fs/fat/Makefile
> +++ b/fs/fat/Makefile
> @@ -25,6 +25,7 @@ LIB	= $(obj)libfat.o
>  
>  AOBJS	=
>  COBJS-$(CONFIG_CMD_FAT)	:= fat.o
> +COBJS-$(CONFIG_FAT_WRITE):= fat_write.o

Can ypu please document this new CONFIG_FAT_WRITE option in the
README?  Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"A complex system that works is invariably found to have evolved from
a simple system that worked."             - John Gall, _Systemantics_

^ permalink raw reply

* [B.A.T.M.A.N.] [PATCH] batman-adv: unify hash_entry field position in tt_local/global_entry
From: Antonio Quartulli @ 2011-10-21 22:55 UTC (permalink / raw)
  To: b.a.t.m.a.n

Function tt_response_fill_table() actually uses a tt_local_entry pointer to
iterate either over the local or the global table entries (it depends on the
what hash table is passed as argument). To iterate over such entries the
hlist_for_each_entry_rcu() macro has to access their "hash_entry" field which
MUST be at the same position in both the tt_global/local_entry structures.

Reported-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
 types.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/types.h b/types.h
index 1ae3557..ab8d0fe 100644
--- a/types.h
+++ b/types.h
@@ -224,22 +224,22 @@ struct socket_packet {
 
 struct tt_local_entry {
 	uint8_t addr[ETH_ALEN];
+	struct hlist_node hash_entry;
 	unsigned long last_seen;
 	uint16_t flags;
 	atomic_t refcount;
 	struct rcu_head rcu;
-	struct hlist_node hash_entry;
 };
 
 struct tt_global_entry {
 	uint8_t addr[ETH_ALEN];
+	struct hlist_node hash_entry; /* entry in the global table */
 	struct orig_node *orig_node;
 	uint8_t ttvn;
 	uint16_t flags; /* only TT_GLOBAL_ROAM is used */
 	unsigned long roam_at; /* time at which TT_GLOBAL_ROAM was set */
 	atomic_t refcount;
 	struct rcu_head rcu;
-	struct hlist_node hash_entry; /* entry in the global table */
 };
 
 struct tt_change_node {
-- 
1.7.3.4


^ permalink raw reply related

* [U-Boot] [PATCH v17 9/9] doc/README: documents and readme for NDS32 arch
From: Wolfgang Denk @ 2011-10-21 22:54 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <1319092871-28135-9-git-send-email-macpaul@andestech.com>

Dear Macpaul Lin,

In message <1319092871-28135-9-git-send-email-macpaul@andestech.com> you wrote:
> Documents and READMEs for NDS32 architecture.
> It patch also provides usage of SoC AG101 and board ADP-AG101.
> 
> Signed-off-by: Macpaul Lin <macpaul@andestech.com>
> ---
> Changes for v1-v10:
>   - The patch of documentation was not included.
> Changes for v11:
>   - Add the documents of NDS32, ag101, N1213.
> Changes for v12-v16:
>   - No change.
> Changes for v17:
>   - Fix README (update only).
> 
>  README                |   24 ++++++++++++++--
>  doc/README.N1213      |   55 ++++++++++++++++++++++++++++++++++++
>  doc/README.NDS32      |   41 +++++++++++++++++++++++++++
>  doc/README.ag101      |   74 +++++++++++++++++++++++++++++++++++++++++++++++++
>  doc/README.standalone |    1 +
>  5 files changed, 192 insertions(+), 3 deletions(-)
>  create mode 100644 doc/README.N1213
>  create mode 100644 doc/README.NDS32
>  create mode 100644 doc/README.ag101

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It is more rational to sacrifice one life than six.
	-- Spock, "The Galileo Seven", stardate 2822.3

^ permalink raw reply

* [U-Boot] [PATCH v17 8/9] adp-ag101: add board adp-ag101 support
From: Wolfgang Denk @ 2011-10-21 22:54 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <1319092871-28135-8-git-send-email-macpaul@andestech.com>

Dear Macpaul Lin,

In message <1319092871-28135-8-git-send-email-macpaul@andestech.com> you wrote:
> Add evaluation board "adp-ag101" configuration file adp-ag101.h.
> Add adp-ag101.c board config and related settings.
> Add board adp-ag101 into boards.cfg
> 
> Signed-off-by: Macpaul Lin <macpaul@andestech.com>
> ---
> Changes for v1-v4:
>   - code clean up
> Changes for v5-v6:
>   - Refine the definitions and parameters about CLK,
>     AHB controller, SDRAM controller, Static memory controllers.
>   - Add APB_CLK, AHB_CLK, SYS_CLK definitions for backward compatible.
>   - ftahbc010:
>     - Update include path of ftahbc010.
>   - ftsdmc021:
>     - Update include path of ftsdmc021.
>   - ftsmc020:
>     - Update include path of ftsmc020.
>   - ftwdt010:
>     - Fix WDT define and update include path.
>     - Fix ftwdt010 for hardware reset.
>   - ftpmu010:
>     - Remove duplicate PMU definitions.
>     - Add related configurations.
>   - Fix MAX malloc len and fix saveenv.
>   - clean up.
> Changes for v7:
>   - clean up.
>   - Move CONFIG_SYS_TEXT_BASE from board/config.mk.
>   - Fix Makefile and remove config.mk
> Changes for v8:
>   - No change.
> Changes for v9:
>   - Fix because other boards has been added into boards.cfg and
>     broken this patch.
> Changes for v10:
>   - adp-ag101.h
>    - Fix lines over 80 characters.
>    - Fix for introducing gen-asm-offset.
>    - Add mmc support for FTSDC010 SD/MMC Controller.
>    - fix flash init.
>    - fix ftsmc010 configuraion for flash probing.
>    - Add SP_INIT related configurations for supporting relocation.
>    - Fix CONFIG_TEXT_BASE for relocation.
>    - Add CONFIG_MEM_REMAP for some hardware boards and non-OS application.
>   - adp-ag101.c
>    - Clean up for braces according to Wolfgang's suggestion.
>    - Add mmc support for FTSDC010 SD/MMC Controller.
>    - fix dram init(), made this more simpler.
> Changes for v11:
>   - No change.
> Changes for v12:
>   - adp-ag101.h
>    - fix address when enable CONFIG_SKIP_LOWLEVEL_INIT
> Changes for v13:
>   - board/AndesTech/adp-ag101/Makefile: remove unused clean and distclean.
> Changes for v14:
>   - No change.
> Changes for v15:
>   - adp-ag101.h: drop NET_MULTI
>   - Makefile: clean up Makefile
> Changes for v16:
>   - No change.
> Changes for v17:
>   - Fix boards.cfg (update only).
> 
>  MAINTAINERS                           |   11 +
>  MAKEALL                               |    6 +
>  board/AndesTech/adp-ag101/Makefile    |   44 ++++
>  board/AndesTech/adp-ag101/adp-ag101.c |   89 +++++++
>  boards.cfg                            |    1 +
>  include/configs/adp-ag101.h           |  406 +++++++++++++++++++++++++++++++++
>  6 files changed, 557 insertions(+), 0 deletions(-)
>  create mode 100644 board/AndesTech/adp-ag101/Makefile
>  create mode 100644 board/AndesTech/adp-ag101/adp-ag101.c
>  create mode 100644 include/configs/adp-ag101.h

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"'Tis true, 'tis pity, and pity 'tis 'tis true."
    - Poloniouius, in Willie the Shake's _Hamlet, Prince of Darkness_

^ permalink raw reply

* Re: [kbd] kbd: loadkeys -d doesn't work
From: Alexey Gladkov @ 2011-10-21 22:54 UTC (permalink / raw)
  To: kbd
In-Reply-To: <b4ac641f-87d0-440c-9509-13da9129c169@zmail07.collab.prod.int.phx2.redhat.com>

21.10.2011 18:56, Jaroslav Skarvada wrote:
> I think it shouldn't read stdin in case of optd

But in your previous email to you, do exactly the same.
What has changed?

Why behavior when the file must be different from the standard input
handle ? I don't see any difference.

-- 
Rgrds, legion



^ permalink raw reply

* [U-Boot] [PATCH v17 7/9] nds32: common bdinfo, bootm, image support
From: Wolfgang Denk @ 2011-10-21 22:54 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <1319092871-28135-7-git-send-email-macpaul@andestech.com>

Dear Macpaul Lin,

In message <1319092871-28135-7-git-send-email-macpaul@andestech.com> you wrote:
> Add support of NDS32 to common commands bdinfo, bootm, and image format.
> 
> Signed-off-by: Macpaul Lin <macpaul@andestech.com>
> ---
> Changes for v1-v6:
>   - Code clean up
> Changes for v7-v9:
>   - No Change.
> Changes for v10:
>   - fix up according to the changes in master tree.
> Changes for v11:
>   - No Change.
> Changes for v12:
>   - remove seldom used bi_env parameter.
> Changes for v13-v14:
>   - No change.
> Changes for v15:
>   - cmd_bootm.c and image.h
>     - Fix for new image.h according to Mike's Contribute.
> Changes for v16:
>   - No change.
> Changes for v17:
>   - Fix for Sandbox added in.
> 
>  common/cmd_bdinfo.c |   25 +++++++++++++++++++++++++
>  common/image.c      |    1 +
>  include/image.h     |    1 +
>  3 files changed, 27 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"There is nothing  so  deadly  as  not  to  hold  up  to  people  the
opportunity to do great and wonderful things, if we wish to stimulate
them in an active way."
- Dr. Harold Urey, Nobel Laureate in chemistry

^ permalink raw reply

* [PATCH v2 1/5] ARM: SPMP8000: Add machine base files
From: Russell King - ARM Linux @ 2011-10-21 22:54 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1409922.Ostx0EbfK3@wuerfel>

On Wed, Oct 19, 2011 at 09:15:35PM +0200, Arnd Bergmann wrote:
> > +#define SERIAL_BASE	((volatile unsigned char *)SPMP8000_UARTC0_BASE)
> 
> drop this, then
> 
> > +static void putc(const char c)
> > +{
> > +	volatile unsigned char *base = SERIAL_BASE;
> 
> make this a "unsigned char __iomem *".
> 
> > +	int i;
> > +
> > +	for (i = 0; i < 0x1000; i++) {
> > +		if (base[UART_LSR << 2] & UART_LSR_THRE)
> > +			break;
> > +		barrier();
> > +	}
> > +
> > +	base[UART_TX << 2] = c;
> > +}
> 
> and use readb_relaxed/writeb_relaxed to do the access. You should
> never just dereference volatile pointers to do an MMIO access.

Note that uncompress.h isn't part of the kernel proper, and so the
MMIO accessors may not work (depends whether the arch out-of-lines
them.)  Moreover, as the MMU is setup with 1:1 mappings, arguably
it's not IOMEM anyway.

^ permalink raw reply

* [U-Boot] [PATCH v17 6/9] nds32: standalone support
From: Wolfgang Denk @ 2011-10-21 22:53 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <1319092871-28135-6-git-send-email-macpaul@andestech.com>

Dear Macpaul Lin,

In message <1319092871-28135-6-git-send-email-macpaul@andestech.com> you wrote:
> Add standalone program related support for nds32 architecture.
> 
> Signed-off-by: Macpaul Lin <macpaul@andestech.com>
> ---
> Changes for v1-v6:
>   - code clean up.
> Changes for v7-v11:
>   - No change.
> Changes for v12:
>   - clean up for linker script.
> Changes for v13-v15:
>   - No change.
> Changes for v16:
>   - x86-testapp.c: fix line over 80 characters.
> Changes for v17:
>   - No change.
> 
>  examples/standalone/nds32.lds     |   56 +++++++++++++++++++++++++++++++++++++
>  examples/standalone/stubs.c       |   17 ++++++++++-
>  examples/standalone/x86-testapp.c |   13 ++++++++
>  3 files changed, 85 insertions(+), 1 deletions(-)
>  create mode 100644 examples/standalone/nds32.lds

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
He'd been wrong, there _was_ a light at the end of the tunnel, and it
was a flamethrower.                         - Terry Pratchett, _Mort_

^ permalink raw reply

* [U-Boot] [PATCH v17 5/9] nds32/lib: add generic funcs in NDS32 lib
From: Wolfgang Denk @ 2011-10-21 22:53 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <1319092871-28135-5-git-send-email-macpaul@andestech.com>

Dear Macpaul Lin,

In message <1319092871-28135-5-git-send-email-macpaul@andestech.com> you wrote:
> Add Makefile, board.c, interrupts.c and bootm.c functions
> to nds32 architecture.
> 
> Signed-off-by: Macpaul Lin <macpaul@andestech.com>
> ---
> Changes for v1-v4:
>   - code clean up and formatting style.
> Changes for v5-v6:
>   - board.c
>    - Do some clean up and add code
>    - Remove display banner which hasn't support.
>    - Add ftpmu010 related power management unit code.
>    - Remove useless LED related code.
>    - Move SDRAM init to board sepecific files. (ex. adp-ag101.c)
>    - Remove CONFIG_SOFT_I2C which hasn't been support.
>    - Remove CONFIG_FSL_ESDHC which hasn't been support.
>    - clean up.
> Changes for v7:
>   - clean up.
>   - move single file patch arch/nds32/config.mk to this commit.
>   - interrupts.c refine origin interrupt enable and disable.
> Changes for v8:
>   - interrups.c: fix up for new ptraces.h.
> Changes for v9:
>   - support CONFIG_STANDALONE_LOAD_ADDR in config.mk
> Changes for v10:
>   - config.mk:
>    - add -fpie flag.
>    - replace -ffixed-8 to -ffixed-10.
>    - add -mrelax and --gc-sections to LDFLAG
>   - board.c:
>    - fix lib/board.c for relocation.
>    - fix dram init for relocation.
> Changes for v11:
>   - arch/nds32/lib/Makefile
>    - replace $(AR) $(call cmd_link_o_target,...)
> Changes for v12:
>   - config.mk
>    - remove $(SRCTREE)/$(CPUDIR)/u-boot.lds
>   - board.c:
>    - remove obsolelte version_string.
>    - remove declaration "extern __bss_end" which is not need.
>    - replace sizeof(gd_t) and sizeof(bd_t) to
>      GENERATED_GBL_DATA_SIZE and GENERATED_BD_INFO_SIZE
>    - add memset to board info (bd)
>    - remove compiler optimization barrier which is not need.
> Changes for v13:
>   - board.c: remove unused CONFIG_IDENT_STRING.
>   - arch/nds32/lib/Makefile: remove unused clean and distclean.
> Changes for v14:
>   - No change.
> Changes for v15:
>   - lib/board.c:
>    - remove duplicate pci init
>    - drop NET_MULTI
> Changes for v16-v17:
>   - No changes.
> 
>  arch/nds32/config.mk        |   35 ++++
>  arch/nds32/lib/Makefile     |   46 +++++
>  arch/nds32/lib/board.c      |  439 +++++++++++++++++++++++++++++++++++++++++++
>  arch/nds32/lib/bootm.c      |  241 ++++++++++++++++++++++++
>  arch/nds32/lib/interrupts.c |  129 +++++++++++++
>  5 files changed, 890 insertions(+), 0 deletions(-)
>  create mode 100644 arch/nds32/config.mk
>  create mode 100644 arch/nds32/lib/Makefile
>  create mode 100644 arch/nds32/lib/board.c
>  create mode 100644 arch/nds32/lib/bootm.c
>  create mode 100644 arch/nds32/lib/interrupts.c

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
When all else fails, read the instructions.

^ permalink raw reply

* [U-Boot] Porting lpc313x support up to current u-boot
From: jonsmirl at gmail.com @ 2011-10-21 22:53 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <4EA1E142.7010606@aribaud.net>

On Fri, Oct 21, 2011 at 5:16 PM, Albert ARIBAUD
<albert.u.boot@aribaud.net> wrote:
> Hi Jon,
>
> Le 16/10/2011 22:07, jonsmirl at gmail.com a ?crit :
>>
>> On Sat, Oct 15, 2011 at 11:37 PM, jonsmirl at gmail.com<jonsmirl@gmail.com>
>> ?wrote:
>>>
>>> I'm porting the lpc313x uboot located here, up to current uboot. ?It
>>> is based on ?U-boot.2009.11.1
>>> http://git.lpclinux.com/?p=uboot-2009.11-lpc313x.git;a=summary
>>>
>>> What do I do with the cpu directory?
>>>
>>> http://git.lpclinux.com/?p=uboot-2009.11-lpc313x.git;a=tree;f=cpu/lpc313x;h=5cc2c80b1ef75c729abff5ecbcaaef6c49f181b1;hb=HEAD
>>> It has a lds file in it containing symbols needs by init.c
>>
>> If I move the lpc313x directory under the arm926ejs directory which
>> also contains a linker script, what is the normal procedure for
>> reconciling the two scripts?
>
> You should not need any lds besides the one for arm926ejs, and using another
> script would probably break a lot of things -- relocation, to begin with --
> and anyway it would probably not build clean.

I've been making some progress. The out of tree lpc31xx uboot code has
it's own implementation of a SPL (secondary program loader). That why
the lds file is complicated. I've slowly been trying to comprehend the
current uboot SPL support and to convert the NXP code over to the that
model.

I'm making progress. The SPL hardware model for the lpc31xx is a
little different than the current uboot model. The lpc31xx has 32KB of
SRAM to work with and a ROM that can IPL from seven different sources.
The existing SPL implementations are trying to fit into 4KB instead of
32KB. Since I have a lot more memory I can keep the NXP code that
autodetects the boot flash type for example.



>
> Amicalement,
> --
> Albert.
>



-- 
Jon Smirl
jonsmirl at gmail.com

^ permalink raw reply

* [U-Boot] [PATCH v17 4/9] nds32/ag101: cpu and init funcs of SoC ag101
From: Wolfgang Denk @ 2011-10-21 22:52 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <1319092871-28135-4-git-send-email-macpaul@andestech.com>

Dear Macpaul Lin,

In message <1319092871-28135-4-git-send-email-macpaul@andestech.com> you wrote:
> SoC ag101 is the first chip using NDS32 N1213 cpu core.
> Add header file of device offset support for SoC ag101.
> Add main function of SoC ag101 based on NDS32 n1213 core.
> Add lowlevel_init.S and other periphal related code.
> 
> This version of lowlevel_init.S also replace hardcode value
> by MARCO defines from the GPL version andesboot for better
> code quality.
> 
> Signed-off-by: Macpaul Lin <macpaul@andestech.com>
> ---
> Changes for v1-v4:
>   - Code clean up.
> Changes for v5-v6:
>   - Split watchdog.S from lowlevel_init.S.
>   - Fix hardware reset by using watchdog reset in do_reset() in cpu.c.
>    - reset_cpu was remove inside do_reset().
>   - lowlevel_init.S
>    - Change hard code value into MARCO definitions.
>    - ftsmc010
>      - Fix FTSMC020_TPR_AT2 from 1 to 3 (0xff3ff)
>    - ftsdmc021
>      - Fix hardcoded address of CR1, CR2, TR1, TR2, BANK0 registers.
>      - Fix the default configuration value of FTSDMC and FTSMC controller.
>    - Remove some ftpmu010 and flash probe code to C functions.
> Changes for v7:
>   - clean up.
> Changes for v8-v9:
>   - No change.
> Changes for v10:
>   - asm-offset.c: file added for ag101 use only.
>   - ag101/Makefile: add gen-asm-offset support to ag101 for lowlevel_init.S.
>   - Makefile: add gen-asm-offset support for NDS32 based core and SoCs.
>   - cpu.c: remove unused cpu_init().
>   - lowlevel_init.S
>    - Introduce SoC specific gen-asm-offset.h to lowlevel_init.S
>    - Replace routings by macros to made code much easier to understand.
>    - Add debug LED support.
>    - Add CONFIG_MEM_REMAP for those boards must do memort remapping.
> Changes for v11:
>   - arch/nds32/cpu/n1213/ag101/Makefile
>    - replace $(AR) $(call cmd_link_o_target,...)
> Changes for v12:
>   - Simplify the commit log about the part of lowlevel_init.S.
> Changes for v13:
>   - arch/nds32/cpu/n1213/ag101/Makefile: remove unused gen-asm-offset.
>   - Makefile: remove unused gen-asm-offset because merged asm-offsets.
> Changes for v14:
>   - lowlevel_init.S: fix include path of <generated/asm-offsets.h>
> Changes for v15:
>   - fix sleep delay.
> Changes for v16:
>   - arch/nds32/include/asm/arch-ag101/ag101.h: fix lines over 80 characters
>   - arch/nds32/cpu/n1213/ag101/lowlevel_init.S: fix lines over 80 characters
>   - arch/nds32/cpu/n1213/ag101/timer.c: fix line over 80 characters
> Changes for v17:
>   - No changes.
> 
>  arch/nds32/cpu/n1213/ag101/Makefile        |   58 +++++++
>  arch/nds32/cpu/n1213/ag101/asm-offsets.c   |   43 +++++
>  arch/nds32/cpu/n1213/ag101/cpu.c           |  200 +++++++++++++++++++++++
>  arch/nds32/cpu/n1213/ag101/lowlevel_init.S |  238 ++++++++++++++++++++++++++++
>  arch/nds32/cpu/n1213/ag101/timer.c         |  205 ++++++++++++++++++++++++
>  arch/nds32/cpu/n1213/ag101/watchdog.S      |   48 ++++++
>  arch/nds32/include/asm/arch-ag101/ag101.h  |  103 ++++++++++++
>  7 files changed, 895 insertions(+), 0 deletions(-)
>  create mode 100644 arch/nds32/cpu/n1213/ag101/Makefile
>  create mode 100644 arch/nds32/cpu/n1213/ag101/asm-offsets.c
>  create mode 100644 arch/nds32/cpu/n1213/ag101/cpu.c
>  create mode 100644 arch/nds32/cpu/n1213/ag101/lowlevel_init.S
>  create mode 100644 arch/nds32/cpu/n1213/ag101/timer.c
>  create mode 100644 arch/nds32/cpu/n1213/ag101/watchdog.S
>  create mode 100644 arch/nds32/include/asm/arch-ag101/ag101.h

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"I didn't know it was impossible when I did it."

^ permalink raw reply

* [U-Boot] [PATCH v17 3/9] nds32/core N1213: NDS32 N12 core family N1213
From: Wolfgang Denk @ 2011-10-21 22:52 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <1319092871-28135-3-git-send-email-macpaul@andestech.com>

Dear Macpaul Lin,

In message <1319092871-28135-3-git-send-email-macpaul@andestech.com> you wrote:
> Add N1213 cpu core (N12 Core family) support for NDS32 arch.
> This patch includes start.S for the initialize procedure of N1213.
> 
> Start procedure:
>  start.S will start up the N1213 CPU core at first,
>  then jump to SoC dependent "lowlevel_init.S" and
>  "watchdog.S" to configure peripheral devices.
> 
> Signed-off-by: Macpaul Lin <macpaul@andestech.com>
> Signed-off-by: Greentime Hu <greentime@andestech.com>
> ---
> Changes for v1 to v6:
>   - Style clean up and reorganize code
> Changes for v7-v9:
>   - No Change.
> Changes for v10:
>   - start.S of N1213 CPU has been rewrote for relocation support.
>   - u-boot.lds:
>    - Add got and *(.got.plt) section for support GCC 4 toolchain
>    - Modified for relocation implementation.
> Changes for v11:
>   - arch/nds32/cpu/n1213/Makefile
>    - replace $(AR) $(call cmd_link_o_target,...)
> Changes for v12:
>   - u-boot.lds
>    - Remove the 0x00000000 base address in linker script.
>      The base address of the binary will be determined by CONFIG_SYS_TEXT_BASE
>   - Remove the CPU features in commit log and add to README in later patches.
> Changes for v13-v14:
>   - No change.
> Changes for v15:
>   - start.S: fix exception vector aligment (add setivb in reset vector).
> Changes for v16:
>   - start.S: remove lines over 80 characters.
> Changes for v17:
>   - Fix a space ident warning which checkpatch doesn't found.
> 
>  arch/nds32/cpu/n1213/Makefile   |   50 ++++
>  arch/nds32/cpu/n1213/start.S    |  529 +++++++++++++++++++++++++++++++++++++++
>  arch/nds32/cpu/n1213/u-boot.lds |   70 +++++
>  3 files changed, 649 insertions(+), 0 deletions(-)
>  create mode 100644 arch/nds32/cpu/n1213/Makefile
>  create mode 100644 arch/nds32/cpu/n1213/start.S
>  create mode 100644 arch/nds32/cpu/n1213/u-boot.lds

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
All he had was nothing, but that was something, and now it  had  been
taken away.                             - Terry Pratchett, _Sourcery_

^ permalink raw reply

* [U-Boot] [PATCH v17 2/9] nds32: add NDS32 support into common header file
From: Wolfgang Denk @ 2011-10-21 22:52 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <1319092871-28135-2-git-send-email-macpaul@andestech.com>

Dear Macpaul Lin,

In message <1319092871-28135-2-git-send-email-macpaul@andestech.com> you wrote:
> Add NDS32 support into common header file.
> 
> Signed-off-by: Macpaul Lin <macpaul@andestech.com>
> ---
> Changes for v1-v7:
>   - No change
> Changes for v8:
>   - Fix the patch according to dependency of x86's Fix
> Changes for v9-v16:
>   - No change
> Changes for v17:
>   - Fix for arch Sandbox has been committed.
> 
>  include/common.h |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Tactical? TACTICAL!?!? Hey, buddy, we went from kilotons to  megatons
several  minutes  ago.  We don't need no stinkin' tactical nukes. (By
the way, do you have change for 10 million people?)           - lwall

^ permalink raw reply

* [U-Boot] [PATCH v17 1/9] nds32: add header files support for nds32
From: Wolfgang Denk @ 2011-10-21 22:51 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <1319092871-28135-1-git-send-email-macpaul@andestech.com>

Dear Macpaul Lin,

In message <1319092871-28135-1-git-send-email-macpaul@andestech.com> you wrote:
> Add generic header files support for nds32 architecture.
> Cache, ptregs, data type and other definitions are included.
> 
> Signed-off-by: Macpaul Lin <macpaul@andestech.com>
> ---
> Changes for v1-v4:
>   - Code cleanup and style formatting.
> Changes for v5-v6:
>   - This patch also updated the following changes against the
>     change after master tree (v2010.12-rc1).
>   - fix upper case definitions in cache.h
>   - Support GD_FLG_ENV_READY and env_buf vars in nds32 global_data.h.
>   - Add readsb, writesb functions into io.h.
> Changes for v7:
>   - clean up
>   - volatile:
>    - types.h
>     - remove typedef volatile unsigned char  vuchar;
>     - remove typedef volatile unsigned long  vulong;
>     - remove typedef volatile unsigned short vushort;
>    - u-boot.h: remove bd_info_ext bi_ext
>    - bitops.h: add accessor function to bit operation with volatile var.
>    - system.h: add system.h for local_irq operation with flag.
> Changes for v8:
>   - ptrace.h: rewrite the pt_reg structure, and merge ptregs.h.
>   - ptregs.h: removed
> Changes for v9:
>   - No change.
> Changes for v10:
>   - macro.h: add writel and setbf macros
>   - u-boot-nds32.h:
>    - Remove obsolete andesboot_* symbols for relocation.
>    - Add _bss_*_offset symbols for relocation.
>   - config.h: add manual relocation support as default.
> Changes for v11:
>   - unaligned.h: replace asm/unaligned.h with asm-generic/unaligned.h
> Changes for v12:
>   - remove no used memory.h
>   - remove seldom used bi_env parameter
>   - u-boot-nds32.h:
>    - remove duplicate timer_init()
> Changes for v13-v14:
>   - No change.
> Changes for v15:
>   - u-boot.h: fix for new image.h according to Mike's contribution.
> Changes for v16:
>   - asm/io.h:
>    - fix line over 80 characters.
>    - remove volatiles for __arch_getb
>   - asm/bitops.h: remove volatiles for inline __set_bit()
>   - asm/global_data.h: fix line over 80 characters.
> Changes for v17:
>   - No Change.
> 
>  arch/nds32/include/asm/bitops.h       |  186 +++++++++++++++
>  arch/nds32/include/asm/byteorder.h    |   36 +++
>  arch/nds32/include/asm/cache.h        |   54 +++++
>  arch/nds32/include/asm/config.h       |   28 +++
>  arch/nds32/include/asm/global_data.h  |   89 +++++++
>  arch/nds32/include/asm/io.h           |  412 +++++++++++++++++++++++++++++++++
>  arch/nds32/include/asm/mach-types.h   |   29 +++
>  arch/nds32/include/asm/macro.h        |   96 ++++++++
>  arch/nds32/include/asm/posix_types.h  |   84 +++++++
>  arch/nds32/include/asm/processor.h    |   25 ++
>  arch/nds32/include/asm/ptrace.h       |   88 +++++++
>  arch/nds32/include/asm/string.h       |   57 +++++
>  arch/nds32/include/asm/system.h       |   88 +++++++
>  arch/nds32/include/asm/types.h        |   63 +++++
>  arch/nds32/include/asm/u-boot-nds32.h |   51 ++++
>  arch/nds32/include/asm/u-boot.h       |   63 +++++
>  arch/nds32/include/asm/unaligned.h    |    1 +
>  17 files changed, 1450 insertions(+), 0 deletions(-)
>  create mode 100644 arch/nds32/include/asm/bitops.h
>  create mode 100644 arch/nds32/include/asm/byteorder.h
>  create mode 100644 arch/nds32/include/asm/cache.h
>  create mode 100644 arch/nds32/include/asm/config.h
>  create mode 100644 arch/nds32/include/asm/global_data.h
>  create mode 100644 arch/nds32/include/asm/io.h
>  create mode 100644 arch/nds32/include/asm/mach-types.h
>  create mode 100644 arch/nds32/include/asm/macro.h
>  create mode 100644 arch/nds32/include/asm/posix_types.h
>  create mode 100644 arch/nds32/include/asm/processor.h
>  create mode 100644 arch/nds32/include/asm/ptrace.h
>  create mode 100644 arch/nds32/include/asm/string.h
>  create mode 100644 arch/nds32/include/asm/system.h
>  create mode 100644 arch/nds32/include/asm/types.h
>  create mode 100644 arch/nds32/include/asm/u-boot-nds32.h
>  create mode 100644 arch/nds32/include/asm/u-boot.h
>  create mode 100644 arch/nds32/include/asm/unaligned.h

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Open the pod bay doors, HAL."                    - Dave Bowman, 2001

^ permalink raw reply

* What's cooking in git.git (Oct 2011, #08; Fri, 21)
From: Junio C Hamano @ 2011-10-21 22:51 UTC (permalink / raw)
  To: git

Here are the topics that have been cooking.  Commits prefixed with '-' are
only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'.

It probably is a good point to stop taking new topics and start
switching our focus to fixing bugs in the topics already in 'master'.

Here are the repositories that have my integration branches:

With maint, master, next, pu, todo, html and man:

        git://git.kernel.org/pub/scm/git/git.git
        git://repo.or.cz/alt-git.git
        https://code.google.com/p/git-core/
        https://github.com/git/git

With only maint, master, html and man:

        git://git.sourceforge.jp/gitroot/git-core/git.git
        git://git-core.git.sourceforge.net/gitroot/git-core/git-core

With all the topics and integration branches but not todo, html or man:

        https://github.com/gitster/git

By the way, I am planning to stop pushing the generated documentation
branches to the above repositories in the near term, as they are not
sources. The only reason the source repository at k.org has hosted these
branches was because it was the only repository over there that was
writable by me; it was an ugly historical and administrative workaround
and not a demonstration of the best practice.

They are pushed to their own separate repositories instead:

        git://git.kernel.org/pub/scm/git/git-{htmldocs,manpages}.git/
        git://repo.or.cz/git-{htmldocs,manpages}.git/
        https://code.google.com/p/git-{htmldocs,manpages}.git/
        https://github.com/gitster/git-{htmldocs,manpages}.git/

--------------------------------------------------
[New Topics]

* fg/submodule-git-file-git-dir (2011-10-21) 2 commits
 - submodule::module_clone(): silence die() message from module_name()
 - submodule: whitespace fix

* jc/broken-ref-dwim-fix (2011-10-19) 3 commits
  (merged to 'next' on 2011-10-19 at 40cad95)
 + resolve_ref(): report breakage to the caller without warning
 + resolve_ref(): expose REF_ISBROKEN flag
 + refs.c: move dwim_ref()/dwim_log() from sha1_name.c
 (this branch is tangled with jc/check-ref-format-fixup.)

This only takes good bits from the failed jc/check-ref-format-fixup topic
and implements saner workaround for the recent breakage on the 'master'.
Will merge to 'master' shortly.

* jm/maint-gitweb-filter-forks-fix (2011-10-21) 1 commit
  (merged to 'next' on 2011-10-21 at debedcd)
 + gitweb: fix regression when filtering out forks

Will merge to 'master' shortly.

* lh/gitweb-site-html-head (2011-10-21) 1 commit
 - gitweb: provide a way to customize html headers

Looked Ok.
Will merge to 'next'.

* mh/ref-api-3 (2011-10-19) 11 commits
 - is_refname_available(): reimplement using do_for_each_ref_in_array()
 - names_conflict(): simplify implementation
 - names_conflict(): new function, extracted from is_refname_available()
 - repack_without_ref(): reimplement using do_for_each_ref_in_array()
 - do_for_each_ref_in_array(): new function
 - do_for_each_ref(): correctly terminate while processesing extra_refs
 - add_ref(): take a (struct ref_entry *) parameter
 - create_ref_entry(): extract function from add_ref()
 - parse_ref_line(): add a check that the refname is properly formatted
 - repack_without_ref(): remove temporary
 - Rename another local variable name -> refname
 (this branch uses mh/ref-api and mh/ref-api-2.)

Looked reasonable.
Will merge to 'next'.

* mm/mediawiki-author-fix (2011-10-20) 1 commit
 - git-remote-mediawiki: don't include HTTP login/password in author

Will merge to 'next'.

--------------------------------------------------
[Stalled]

* hv/submodule-merge-search (2011-10-13) 4 commits
 - submodule.c: make two functions static
 - allow multiple calls to submodule merge search for the same path
 - push: Don't push a repository with unpushed submodules
 - push: teach --recurse-submodules the on-demand option

What the topic aims to achieve may make sense, but the implementation
looked somewhat suboptimal.

The fix-up at the tip queued on fg/submodule-auto-push topic has been
moved to this topic.

* sr/transport-helper-fix-rfc (2011-07-19) 2 commits
 - t5800: point out that deleting branches does not work
 - t5800: document inability to push new branch with old content

Perhaps 281eee4 (revision: keep track of the end-user input from the
command line, 2011-08-25) would help.

* jc/lookup-object-hash (2011-08-11) 6 commits
 - object hash: replace linear probing with 4-way cuckoo hashing
 - object hash: we know the table size is a power of two
 - object hash: next_size() helper for readability
 - pack-objects --count-only
 - object.c: remove duplicated code for object hashing
 - object.c: code movement for readability

I do not think there is anything fundamentally wrong with this series, but
the risk of breakage far outweighs observed performance gain in one
particular workload.

--------------------------------------------------
[Cooking]

* rr/revert-cherry-pick (2011-10-19) 6 commits
 - revert: simplify communicating command-line arguments
 - revert: allow mixed pick and revert instructions
 - revert: make commit subjects in insn sheet optional
 - revert: fix buffer overflow in insn sheet parser
 - revert: simplify getting commit subject in format_todo()
 - revert: free msg in format_todo()

Perhaps 3rd and 4th should be squashed together?

* jc/match-refs-clarify (2011-09-12) 2 commits
  (merged to 'next' on 2011-10-19 at b295e1e)
 + rename "match_refs()" to "match_push_refs()"
 + send-pack: typofix error message

Will merge to 'master' shortly.

* jn/libperl-git-config (2011-10-21) 2 commits
  (merged to 'next' on 2011-10-21 at 76e2d4b)
 + Add simple test for Git::config_path() in t/t9700-perl-git.sh
 + libperl-git: refactor Git::config_*

Will merge to 'master' shortly.

* ss/inet-ntop (2011-10-18) 1 commit
  (merged to 'next' on 2011-10-19 at 85469f6)
 + inet_ntop.c: Work around GCC 4.6's detection of uninitialized variables

Will merge to 'master' shortly.

* jc/check-ref-format-fixup (2011-10-19) 3 commits
  (merged to 'next' on 2011-10-19 at 98981be)
 + Revert "Restrict ref-like names immediately below $GIT_DIR"
  (merged to 'next' on 2011-10-15 at 8e89bc5)
 + Restrict ref-like names immediately below $GIT_DIR
 + refs.c: move dwim_ref()/dwim_log() from sha1_name.c
 (this branch is tangled with jc/broken-ref-dwim-fix.)

This became a no-op except for the bottom one which is part of the other
topic now.
Will discard once the other topic graduates to 'master'.

* pw/p4-update (2011-10-17) 6 commits
  (merged to 'next' on 2011-10-17 at f69f6cc)
 + git-p4: handle files with shell metacharacters
 + git-p4: keyword flattening fixes
 + git-p4: stop ignoring apple filetype
 + git-p4: recognize all p4 filetypes
 + git-p4: handle utf16 filetype properly
 + git-p4 tests: refactor and cleanup

Will merge to 'master' in the fifth wave.

* cn/doc-config-bare-subsection (2011-10-16) 1 commit
  (merged to 'next' on 2011-10-17 at a6412d4)
 + Documentation: update [section.subsection] to reflect what git does

Will merge to 'master' in the fifth wave.

* cb/daemon-permission-errors (2011-10-17) 2 commits
 - daemon: report permission denied error to clients
 - daemon: add tests
 (this branch uses jk/daemon-msgs.)

The tip commit might be loosening things a bit too much.
Will keep in 'pu' until hearing a convincing argument for the patch.

* jc/verbose-checkout (2011-10-16) 2 commits
 - checkout -v: give full status output after switching branches
 - checkout: move the local changes report to the end

This is just to leave a record that the reason why we do not do this not
because we are incapable of coding this, but because it is not a good idea
to do this. I suspect people who are new to git that might think they need
it would soon realize the don't.

Will keep in 'pu' as a showcase for a while and then will drop.

* kk/gitweb-side-by-side-diff (2011-10-17) 2 commits
 - gitweb: add a feature to show side-by-side diff
 - gitweb: change format_diff_line() to remove leading SP from $diff_class

Fun.
Will keep in 'pu' until the planned re-roll comes.

* mh/ref-api-2 (2011-10-17) 14 commits
  (merged to 'next' on 2011-10-19 at cc89f0e)
 + resolve_gitlink_ref_recursive(): change to work with struct ref_cache
 + Pass a (ref_cache *) to the resolve_gitlink_*() helper functions
 + resolve_gitlink_ref(): improve docstring
 + get_ref_dir(): change signature
 + refs: change signatures of get_packed_refs() and get_loose_refs()
 + is_dup_ref(): extract function from sort_ref_array()
 + add_ref(): add docstring
 + parse_ref_line(): add docstring
 + is_refname_available(): remove the "quiet" argument
 + clear_ref_array(): rename from free_ref_array()
 + refs: rename parameters result -> sha1
 + refs: rename "refname" variables
 + struct ref_entry: document name member
 + cache.h: add comments for git_path() and git_path_submodule()
 (this branch is used by mh/ref-api-3; uses mh/ref-api.)

It is either merge this quickly to 'master' and hope there won't be any
more unexpected breakage that forces us to delay the release, or hold it
on 'next' until the next cycle. I am inclined to the former, but not quite
ready to commit to it yet.

* po/insn-editor (2011-10-17) 1 commit
  (merged to 'next' on 2011-10-19 at cbf5e0b)
 + "rebase -i": support special-purpose editor to edit insn sheet

Will merge to 'master' shortly.

* dm/pack-objects-update (2011-10-20) 4 commits
 - pack-objects: don't traverse objects unnecessarily
 - pack-objects: rewrite add_descendants_to_write_order() iteratively
 - pack-objects: use unsigned int for counter and offset values
 - pack-objects: mark add_to_write_order() as inline

Need to re-read this before deciding what to do; it came a bit too late in
the cycle for a series that touches a seriously important part of the
system.

* jk/git-tricks (2011-10-21) 3 commits
 - completion: match ctags symbol names in grep patterns
 - contrib: add git-jump script
 - contrib: add diff highlight script

Will merge to 'next'.

* jc/make-tags (2011-10-18) 1 commit
  (merged to 'next' on 2011-10-19 at b0b91bf)
 + Makefile: ask "ls-files" to list source files if available

Will merge to 'master' shortly.

* jc/signed-commit (2011-10-20) 6 commits
 - parse_signed_commit: really use the entire commit log message
 - test "commit -S" and "log --show-signature"
 - t7004: extract generic "GPG testing" bits
 - log: --show-signature
 - commit: teach --gpg-sign option
 - Split GPG interface into its own helper library

This is to replace the earlier "signed push" experiments. Probably ready
for 'next'.

* mh/ref-api (2011-10-16) 7 commits
  (merged to 'next' on 2011-10-17 at 219000f)
 + clear_ref_cache(): inline function
 + write_ref_sha1(): only invalidate the loose ref cache
 + clear_ref_cache(): extract two new functions
 + clear_ref_cache(): rename parameter
 + invalidate_ref_cache(): expose this function in the refs API
 + invalidate_ref_cache(): take the submodule as parameter
 + invalidate_ref_cache(): rename function from invalidate_cached_refs()
 (this branch is used by mh/ref-api-2 and mh/ref-api-3.)

It is either merge this quickly to 'master' and hope there won't be any
more unexpected breakage that forces us to delay the release, or hold it
on 'next' until the next cycle. I am inclined to the former, but not quite
ready to commit to it yet.

* sg/complete-refs (2011-10-21) 9 commits
 - completion: remove broken dead code from __git_heads() and __git_tags()
 - completion: fast initial completion for config 'remote.*.fetch' value
 - completion: improve ls-remote output filtering in __git_refs_remotes()
 - completion: query only refs/heads/ in __git_refs_remotes()
 - completion: support full refs from remote repositories
 - completion: improve ls-remote output filtering in __git_refs()
 - completion: make refs completion consistent for local and remote repos
 - completion: optimize refs completion
 - completion: document __gitcomp()

Rerolled.

Will keep in 'pu' until an Ack or two from people who have worked on the
completion in the past comes.

* jc/unseekable-bundle (2011-10-13) 2 commits
  (merged to 'next' on 2011-10-19 at 2978ee0)
 + bundle: add parse_bundle_header() helper function
 + bundle: allowing to read from an unseekable fd

Will merge to 'master' shortly.

* jk/daemon-msgs (2011-10-15) 1 commit
  (merged to 'next' on 2011-10-15 at 415cf53)
 + daemon: give friendlier error messages to clients
 (this branch is used by cb/daemon-permission-errors.)

Will merge to 'master' in the fifth wave.

* jk/maint-pack-objects-compete-with-delete (2011-10-14) 2 commits
  (merged to 'next' on 2011-10-15 at 49479e4)
 + downgrade "packfile cannot be accessed" errors to warnings
 + pack-objects: protect against disappearing packs

Will merge to 'master' in the fifth wave.

* cn/fetch-prune (2011-10-15) 5 commits
  (merged to 'next' on 2011-10-16 at 02a449e)
 + fetch: treat --tags like refs/tags/*:refs/tags/* when pruning
 + fetch: honor the user-provided refspecs when pruning refs
 + remote: separate out the remote_find_tracking logic into query_refspecs
 + t5510: add tests for fetch --prune
 + fetch: free all the additional refspecs

Will merge to 'master' in the sixth wave.

* sc/difftool-skip (2011-10-14) 2 commits
  (merged to 'next' on 2011-10-14 at b91c581)
 + t7800: avoid arithmetic expansion notation
  (merged to 'next' on 2011-10-11 at 38d7e84)
 + git-difftool: allow skipping file by typing 'n' at prompt

Will merge to 'master' in the fifth wave.

* jc/maint-remove-renamed-ref (2011-10-12) 1 commit
  (merged to 'next' on 2011-10-12 at 819c3e4)
 + branch -m/-M: remove undocumented RENAMED-REF

Will merge to 'master' in the sixth wave.

* ph/transport-with-gitfile (2011-10-11) 5 commits
  (merged to 'next' on 2011-10-12 at 6d58417)
 + Fix is_gitfile() for files too small or larger than PATH_MAX to be a gitfile
  (merged to 'next' on 2011-10-06 at 891b8b6)
 + Add test showing git-fetch groks gitfiles
 + Teach transport about the gitfile mechanism
 + Learn to handle gitfiles in enter_repo
 + enter_repo: do not modify input

Will merge to 'master' in the fifth wave.

* jc/request-pull-show-head-4 (2011-10-15) 11 commits
  (merged to 'next' on 2011-10-15 at 7e340ff)
 + fmt-merge-msg.c: Fix an "dubious one-bit signed bitfield" sparse error
  (merged to 'next' on 2011-10-10 at 092175e)
 + environment.c: Fix an sparse "symbol not declared" warning
 + builtin/log.c: Fix an "Using plain integer as NULL pointer" warning
  (merged to 'next' on 2011-10-07 at fcaeca0)
 + fmt-merge-msg: use branch.$name.description
  (merged to 'next' on 2011-10-06 at fa5e0fe)
 + request-pull: use the branch description
 + request-pull: state what commit to expect
 + request-pull: modernize style
 + branch: teach --edit-description option
 + format-patch: use branch description in cover letter
 + branch: add read_branch_desc() helper function
 + Merge branch 'bk/ancestry-path' into jc/branch-desc

Will merge to 'master' in the sixth wave.

^ permalink raw reply

* Re: kernel 3.0: BUG: soft lockup: find_get_pages+0x51/0x110
From: Andrea Arcangeli @ 2011-10-21 22:50 UTC (permalink / raw)
  To: Mel Gorman
  Cc: Nai Xia, Hugh Dickins, Pawel Sikora, Andrew Morton, linux-mm,
	jpiszcz, arekm, linux-kernel
In-Reply-To: <20111021174120.GJ608@redhat.com>

On Fri, Oct 21, 2011 at 07:41:20PM +0200, Andrea Arcangeli wrote:
> We have two options:
> 
> 1) we remove the vma_merge call from copy_vma and we do the vma_merge
> manually after mremap succeed (so then we're as safe as fork is and we
> relay on the ordering). No locks but we'll just do 1 more allocation
> for one addition temporary vma that will be removed after mremap
> completed.
> 
> 2) Hugh's original fix.

3) put the src vma at the tail if vma_merge succeeds and the src vma
and dst vma aren't the same

I tried to implement this but I'm still wondering about the safety of
this with concurrent processes all calling mremap at the same time on
the same anon_vma same_anon_vma list, the reasoning I think it may be
safe is in the comment. I run a few mremap with my benchmark where the
THP aware mremap in -mm gets a x10 boost and moves 5G and it didn't
crash but that's about it and not conclusive, if you review please
comment...

I've to pack luggage and prepare to fly to KS tomorrow so I may not be
responsive in the next few days.

===
>From f2898ff06b5a9a14b9d957c7696137f42a2438e9 Mon Sep 17 00:00:00 2001
From: Andrea Arcangeli <aarcange@redhat.com>
Date: Sat, 22 Oct 2011 00:11:49 +0200
Subject: [PATCH] mremap: enforce rmap src/dst vma ordering in case of
 vma_merge succeeding in copy_vma

migrate was doing a rmap_walk with speculative lock-less access on
pagetables. That could lead it to not serialize properly against
mremap PT locks. But a second problem remains in the order of vmas in
the same_anon_vma list used by the rmap_walk.

If vma_merge would succeed in copy_vma, the src vma could be placed
after the dst vma in the same_anon_vma list. That could still lead
migrate to miss some pte.

This patch adds a anon_vma_order_tail() function to force the dst vma
at the end of the list before mremap starts to solve the problem.

If the mremap is very large and there are a lots of parents or childs
sharing the anon_vma root lock, this should still scale better than
taking the anon_vma root lock around every pte copy practically for
the whole duration of mremap.
---
 include/linux/rmap.h |    1 +
 mm/mmap.c            |    8 ++++++++
 mm/rmap.c            |   43 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index 2148b12..45eb098 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -120,6 +120,7 @@ void anon_vma_init(void);	/* create anon_vma_cachep */
 int  anon_vma_prepare(struct vm_area_struct *);
 void unlink_anon_vmas(struct vm_area_struct *);
 int anon_vma_clone(struct vm_area_struct *, struct vm_area_struct *);
+void anon_vma_order_tail(struct vm_area_struct *);
 int anon_vma_fork(struct vm_area_struct *, struct vm_area_struct *);
 void __anon_vma_link(struct vm_area_struct *);
 
diff --git a/mm/mmap.c b/mm/mmap.c
index a65efd4..a5858dc 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2339,7 +2339,15 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
 		 */
 		if (vma_start >= new_vma->vm_start &&
 		    vma_start < new_vma->vm_end)
+			/*
+			 * No need to call anon_vma_order_tail() in
+			 * this case because the same PT lock will
+			 * serialize the rmap_walk against both src
+			 * and dst vmas.
+			 */
 			*vmap = new_vma;
+		else
+			anon_vma_order_tail(new_vma);
 	} else {
 		new_vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
 		if (new_vma) {
diff --git a/mm/rmap.c b/mm/rmap.c
index 8005080..170cece 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -272,6 +272,49 @@ int anon_vma_clone(struct vm_area_struct *dst, struct vm_area_struct *src)
 }
 
 /*
+ * Some rmap walk that needs to find all ptes/hugepmds without false
+ * negatives (like migrate and split_huge_page) running concurrent
+ * with operations that copy or move pagetables (like mremap() and
+ * fork()) to be safe depends the anon_vma "same_anon_vma" list to be
+ * in a certain order: the dst_vma must be placed after the src_vma in
+ * the list. This is always guaranteed by fork() but mremap() needs to
+ * call this function to enforce it in case the dst_vma isn't newly
+ * allocated and chained with the anon_vma_clone() function but just
+ * an extension of a pre-existing vma through vma_merge.
+ *
+ * NOTE: the same_anon_vma list can still changed by other processes
+ * while mremap runs because mremap doesn't hold the anon_vma mutex to
+ * prevent modifications to the list while it runs. All we need to
+ * enforce is that the relative order of this process vmas isn't
+ * changing (we don't care about other vmas order). Each vma
+ * corresponds to an anon_vma_chain structure so there's no risk that
+ * other processes calling anon_vma_order_tail() and changing the
+ * same_anon_vma list under mremap() will screw with the relative
+ * order of this process vmas in the list, because we won't alter the
+ * order of any vma that isn't belonging to this process. And there
+ * can't be another anon_vma_order_tail running concurrently with
+ * mremap() coming from this process because we hold the mmap_sem for
+ * the whole mremap(). fork() ordering dependency also shouldn't be
+ * affected because we only care that the parent vmas are placed in
+ * the list before the child vmas and anon_vma_order_tail won't reorder
+ * vmas from either the fork parent or child.
+ */
+void anon_vma_order_tail(struct vm_area_struct *dst)
+{
+	struct anon_vma_chain *pavc;
+	struct anon_vma *root = NULL;
+
+	list_for_each_entry_reverse(pavc, &dst->anon_vma_chain, same_vma) {
+		struct anon_vma *anon_vma = pavc->anon_vma;
+		VM_BUG_ON(pavc->vma != dst);
+		root = lock_anon_vma_root(root, anon_vma);
+		list_del(&pavc->same_anon_vma);
+		list_add_tail(&pavc->same_anon_vma, &anon_vma->head);
+	}
+	unlock_anon_vma_root(root);
+}
+
+/*
  * Attach vma to its own anon_vma, as well as to the anon_vmas that
  * the corresponding VMA in the parent process is attached to.
  * Returns 0 on success, non-zero on failure.

^ permalink raw reply related

* Re: kernel 3.0: BUG: soft lockup: find_get_pages+0x51/0x110
From: Andrea Arcangeli @ 2011-10-21 22:50 UTC (permalink / raw)
  To: Mel Gorman
  Cc: Nai Xia, Hugh Dickins, Pawel Sikora, Andrew Morton, linux-mm,
	jpiszcz, arekm, linux-kernel
In-Reply-To: <20111021174120.GJ608@redhat.com>

On Fri, Oct 21, 2011 at 07:41:20PM +0200, Andrea Arcangeli wrote:
> We have two options:
> 
> 1) we remove the vma_merge call from copy_vma and we do the vma_merge
> manually after mremap succeed (so then we're as safe as fork is and we
> relay on the ordering). No locks but we'll just do 1 more allocation
> for one addition temporary vma that will be removed after mremap
> completed.
> 
> 2) Hugh's original fix.

3) put the src vma at the tail if vma_merge succeeds and the src vma
and dst vma aren't the same

I tried to implement this but I'm still wondering about the safety of
this with concurrent processes all calling mremap at the same time on
the same anon_vma same_anon_vma list, the reasoning I think it may be
safe is in the comment. I run a few mremap with my benchmark where the
THP aware mremap in -mm gets a x10 boost and moves 5G and it didn't
crash but that's about it and not conclusive, if you review please
comment...

I've to pack luggage and prepare to fly to KS tomorrow so I may not be
responsive in the next few days.

===

^ permalink raw reply

* [U-Boot] [PATCH] cmd_bdinfo: replace print_str() with print_mhz()
From: Wolfgang Denk @ 2011-10-21 22:49 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <1317852487-12499-1-git-send-email-timur@freescale.com>

Dear Timur Tabi,

In message <1317852487-12499-1-git-send-email-timur@freescale.com> you wrote:
> The print_str() helper function for cmd_bdinfo can print any string, but it
> is only used to print MHz values.  Replace it with print_mhz() that takes
> a number and converts it to a string internally.
> 
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> 
> This patch applies on top of "powerpc/85xx: don't display address map size
> (32-bit vs. 36-bit) during boot".
> 
> I've only tested this on PowerPC.
> 
>  common/cmd_bdinfo.c |   72 ++++++++++++++++++++++++--------------------------
>  1 files changed, 35 insertions(+), 37 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
8) Use common sense in routing  cable.  Avoid  wrapping  coax  around
   sources  of  strong  electric  or magnetic fields. Do not wrap the
   cable  around  flourescent  light  ballasts  or  cyclotrons,   for
   example.
- Ethernet Headstart Product, Information and Installation Guide,
   Bell Technologies, pg. 11

^ permalink raw reply

* [Buildroot] Call For Participation: buildroot + crosstool-NG Developpers' Day
From: Robert Schwebel @ 2011-10-21 22:48 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <201108151803.02636.yann.morin.1998@anciens.enib.fr>

Hi Yann,

On Mon, Aug 15, 2011 at 06:03:02PM +0200, Yann E. MORIN wrote:
> The meeting will take place in Prague, Czech Republic, October the 29th,
> 2011, the day after ELC-E 2011. The exact location is as yet unknown, but
> we'll be sure to keep you informed when it is.

Any news about the details? ;)

rsc
-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply


This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.