Re: [PATCH 9/9] powerpc/pm: support deep sleep feature on T1040
On Tue, Mar 11, 2014 at 08:10:24PM -0500, Scott Wood wrote: > > + FSL_DIS_ALL_IRQ > > + > > + /* > > +* Place DDR controller in self refresh mode. > > +* From here on, DDR can't be access any more. > > +*/ > > + lwz r10, 0(r13) > > + orisr10, r10, CCSR_DDR_SDRAM_CFG_2_FRC_SR@h > > + stw r10, 0(r13) > > + > > + /* can't call udelay() here, so use a macro to delay */ > > + FSLDELAY(50) > > A timebase loop doesn't require accessing DDR. > > You also probably want to do a "sync, readback, data dependency, isync" > sequence to make sure that the store has hit CCSR before you begin your > delay (or is a delay required at all if you do that?). Shouldn't we use "readback, sync" here? The following is quoted form t4240RM: To guarantee that the results of any sequence of writes to configuration registers are in effect, the final configuration register write should be immediately followed by a read of the same register, and that should be followed by a SYNC instruction. Then accesses can safely be made to memory regions affected by the configuration register write. > > + > > + /* Enable SCU15 to trigger on RCPM Concentrator 0 */ > > + lwz r10, 0(r15) > > + orisr10, r10, DCSR_EPU_EPECR15_IC0@h > > + stw r10, 0(r15) > > + > > + /* put Core0 in PH15 mode, trigger EPU FSM */ > > + lwz r10, 0(r12) > > + ori r10, r10, CCSR_RCPM_PCPH15SETR_CORE0 > > + stw r10, 0(r12) > > Shouldn't there be a sync to ensure that the previous I/O happens before > the final store to enter PH15? Do we really need a sync here? According to the PowerISA, the above stores should be performed in program order. If two Store instructions or two Load instructions specify storage locations that are both Caching Inhibited and Guarded, the corresponding storage accesses are performed in program order with respect to any processor or mechanism. Thanks, Kevin pgp3W0oJZFfr6.pgp Description: PGP signature
RE: Subject: [PATCH] mm: use vm_map_ram for only temporal object
Hello, I got a mail from Andrew Morton that he fixed my typo and poor English like this: http://ozlabs.org/~akpm/mmots/broken-out/mm-vmallocc-enhance-vm_map_ram-comment-fix.patch Thank you for your attention. > -Original Message- > From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- > ow...@vger.kernel.org] On Behalf Of SeongJae Park > Sent: Tuesday, March 11, 2014 8:51 PM > To: Gioh Kim > Cc: Zhang Yanfei; Minchan Kim; Andrew Morton; Joonsoo Kim; linux- > m...@kvack.org; linux-kernel@vger.kernel.org; 이건호; chanho@lge.com; > Johannes Weiner > Subject: Re: Subject: [PATCH] mm: use vm_map_ram for only temporal object > > Hello Gioh, > > On Mon, Mar 10, 2014 at 7:16 PM, Gioh Kim wrote: > > > > The vm_map_ram has fragment problem because it couldn't purge a > > chunk(ie, 4M address space) if there is a pinning object in that > > addresss space. So it could consume all VMALLOC address space easily. > > We can fix the fragmentation problem with using vmap instead of > > vm_map_ram but vmap is known to slow operation compared to vm_map_ram. > > Minchan said vm_map_ram is 5 times faster than vmap in his experiment. > > So I thought we should fix fragment problem of vm_map_ram because our > > proprietary GPU driver has used it heavily. > > > > On second thought, it's not an easy because we should reuse freed > > space for solving the problem and it could make more IPI and bitmap > > operation for searching hole. It could mitigate API's goal which is very > fast mapping. > > And even fragmentation problem wouldn't show in 64 bit machine. > > > > Another option is that the user should separate long-life and > > short-life object and use vmap for long-life but vm_map_ram for short- > life. > > If we inform the user about the characteristic of vm_map_ram the user > > can choose one according to the page lifetime. > > > > Let's add some notice messages to user. > > > > Signed-off-by: Gioh Kim > > Reviewed-by: Zhang Yanfei > > --- > > mm/vmalloc.c |6 ++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 0fdf968..85b6687 100644 > > --- a/mm/vmalloc.c > > +++ b/mm/vmalloc.c > > @@ -1083,6 +1083,12 @@ EXPORT_SYMBOL(vm_unmap_ram); > > * @node: prefer to allocate data structures on this node > > * @prot: memory protection to use. PAGE_KERNEL for regular RAM > > * > > + * If you use this function for below VMAP_MAX_ALLOC pages, it could > > + be faster > > + * than vmap so it's good. But if you mix long-life and short-life > > + object > > + * with vm_map_ram, it could consume lots of address space by > > + fragmentation > > + * (expecially, 32bit machine). You could see failure in the end. > > looks like trivial typo. Shouldn't s/expecially/especially/ ? > > Thanks. > > > + * Please use this function for short-life object. > > + * > > * Returns: a pointer to the address that has been mapped, or %NULL on > failure > > */ > > void *vm_map_ram(struct page **pages, unsigned int count, int node, > > pgprot_t prot) > > -- > > 1.7.9.5 > > > > > > -- > > To unsubscribe, send a message with 'unsubscribe linux-mm' in the body > > to majord...@kvack.org. For more info on Linux MM, > > see: http://www.linux-mm.org/ . > > Don't email: mailto:"d...@kvack.org;> em...@kvack.org > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majord...@vger.kernel.org More majordomo info at > http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RESEND v2 PATCH 1/2] aio, memory-hotplug: Fix confliction when migrating and accessing ring pages.
Hi Ben, Sorry for the delay. On 03/12/2014 02:46 AM, Benjamin LaHaise wrote: On Mon, Mar 10, 2014 at 04:15:33PM +0800, Tang Chen wrote: IO ring page migration has been implemented by the following patch: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/fs/aio.c?id=36bc08cc01709b4a9bb563b35aa530241ddc63e3 In this patch, ctx->completion_lock is used to prevent other processes from accessing the ring page being migrated. But in aio_setup_ring(), ioctx_add_table() and aio_read_events_ring(), when writing to the ring page, they didn't take ctx->completion_lock. As a result, for example, we have the following problem: ... As above, the new ring page will not be updated. The solution is taking ctx->completion_lock in thread 2, which means, in aio_setup_ring(), ioctx_add_table() and aio_read_events_ring() when writing to ring pages. Upon review, there are still two accesses of ->ring_pages that are not protected by any spinlocks which could potentially race with migration. One is in aio_setup_ring(), which can be easily resolved by moving the assignment of ->ring_pages above the unlock_page(). Yes, you are right. Followed, thanks. Another spot is in aio_read_events_ring() where head and tail are fetched from the ring without any locking. I also fear we'll be introducing new performance issues with all the additonal spinlock bouncing, despite the fact that is only ever needed for migration. I'm going to continue looking into this today and will try to send out a followup to this email later. In the beginning of aio_read_events_ring(), it reads head and tail, not write. So even if ring pages are migrated, the contents of the pages will not be changed. So reading it is OK, from old page or from the new page, I think. -ben -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v2 3/4] ASoC: simple-card: accept many DAI links
> Subject: [PATCH v2 3/4] ASoC: simple-card: accept many DAI links > > Some simple audio cards may have many DAI links. > This patch extends the simple-card driver for handling such cards. > > Signed-off-by: Jean-Francois Moine > --- > sound/soc/generic/simple-card.c | 132 ++- > - > 1 file changed, 85 insertions(+), 47 deletions(-) > > diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c > index 2710b52..8188c34 100644 > --- a/sound/soc/generic/simple-card.c > +++ b/sound/soc/generic/simple-card.c > @@ -107,6 +107,9 @@ asoc_simple_card_sub_parse_of(struct device_node *np, > if (ret < 0) > return ret; > > + if (!dai) > + return 0; > + > /* parse TDM slot */ > ret = snd_soc_of_parse_tdm_slot(np, >slots, >slot_width); > if (ret) > @@ -154,7 +157,7 @@ static int asoc_simple_card_parse_of(struct device_node > *node, > struct snd_soc_dai_link *dai_link = priv->snd_card.dai_link; > struct device_node *np; > char *name; > - int ret; > + int first_link, ret; > > /* parsing the card name from DT */ > snd_soc_of_parse_card_name(>snd_card, "simple-audio-card,name"); > @@ -179,50 +182,67 @@ static int asoc_simple_card_parse_of(struct device_node > *node, > return ret; > } > > - /* CPU sub-node */ > - ret = -EINVAL; > - np = of_get_child_by_name(node, "simple-audio-card,cpu"); > - if (np) { > + /* loop on the DAI links */ > + np = NULL; > + first_link = 1; > + for (;;) { > + np = of_get_next_child(node, np); > + if (!np) > + break; > + > + /* CPU sub-node */ > + if (strcmp(np->name, "simple-audio-card,cpu") != 0) { > + dev_err(dev, "Bad CPU DAI\n"); > + ret = -EINVAL; > + goto err; > + } > ret = asoc_simple_card_sub_parse_of(np, priv->daifmt, > - >cpu_dai, > + first_link ? >cpu_dai : NULL, @Jean-Francois, I'm not sure why only the first link needs parsing the DAIFMT ? On my LS1 platform there are two CODECs and two CPU SAI deivces, SGTL5000 <---> SAI CS42888 <---> ESAI Could the many dai links feature support this case? I my understanding is correct here, this patch will support the Board, in which board there maybe only one CODEC supporting many DAIs... Thanks, -- Best Regards, Xiubo > _link->cpu_of_node, > _link->cpu_dai_name); > - of_node_put(np); > - } > - if (ret < 0) > - return ret; > + if (ret < 0) > + goto err; > > - /* CODEC sub-node */ > - ret = -EINVAL; > - np = of_get_child_by_name(node, "simple-audio-card,codec"); > - if (np) { > + /* CODEC sub-node */ > + np = of_get_next_child(node, np); > + if (strcmp(np->name, "simple-audio-card,codec") != 0) { > + dev_err(dev, "Bad CODEC DAI\n"); > + ret = -EINVAL; > + goto err; > + } > ret = asoc_simple_card_sub_parse_of(np, priv->daifmt, > - >codec_dai, > + first_link ? >codec_dai : NULL, > _link->codec_of_node, > _link->codec_dai_name); > - of_node_put(np); > - } > - if (ret < 0) > - return ret; > + if (ret < 0) > + goto err; > + > + if (!dai_link->cpu_dai_name || !dai_link->codec_dai_name) { > + ret = -EINVAL; > + goto err; > + } > > - if (!dai_link->cpu_dai_name || !dai_link->codec_dai_name) > - return -EINVAL; > + /* simple-card assumes platform == cpu */ > + dai_link->platform_of_node = dai_link->cpu_of_node; > + > + name = devm_kzalloc(dev, > + strlen(dai_link->cpu_dai_name) + > + strlen(dai_link->codec_dai_name) + 2, > + GFP_KERNEL); > + sprintf(name, "%s-%s", dai_link->cpu_dai_name, > + dai_link->codec_dai_name); > + dai_link->name = dai_link->stream_name = name; > + > + dai_link++; > + first_link = 0; > + } > > /* card name is created from CPU/CODEC dai name */ > - name = devm_kzalloc(dev, > - strlen(dai_link->cpu_dai_name) + > - strlen(dai_link->codec_dai_name) + 2, > -
Re: [PATCH v2 0/2] x86: Relocate the compat vdso per process
On 03/11/2014 03:15 PM, Andy Lutomirski wrote: The meat of this patch series is in patch 1. Patch 2 is split out for improved bisectability. Changes from v1: Split into two patches and fixed a comment. Andy Lutomirski (2): x86: Dynamically relocate the compat vdso x86_32: Remove user bit from identity map PDE Documentation/kernel-parameters.txt | 18 +++- arch/x86/Kconfig | 24 +++-- arch/x86/include/asm/elf.h | 4 - arch/x86/include/asm/fixmap.h| 8 -- arch/x86/include/asm/pgtable_types.h | 7 +- arch/x86/include/asm/vdso.h | 5 +- arch/x86/vdso/vdso-layout.lds.S | 2 +- arch/x86/vdso/vdso32-setup.c | 173 --- arch/x86/vdso/vdso32/vdso32.lds.S| 2 - 9 files changed, 111 insertions(+), 132 deletions(-) Why per process? *If* we have compat vdso turned on, can't we just put it in one place system-wide? -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v3 0/5] Add USB nodes for am43xx epos and gp evm
Hi Tony, On 3/7/2014 5:26 PM, George Cherian wrote: The patch series adds USB dt nodes for am43xx epos and gp evm Boot tested with Benoit's for_3.15 + following patches https://patchwork.kernel.org/patch/3600821/ https://patchwork.kernel.org/patch/3600831/ https://patchwork.kernel.org/patch/3600851/ https://patchwork.kernel.org/patch/3600841/ Changes from v1 -> v2 * Reorder "doc: Add "ti,am437x-dwc3" comaptible for dwc3 glue" * Address v1 coments on "ARM: dts: AM4372: Add USB nodes" Changes from v2 -> v3 * Removed unwanted dwc3_1 and dwc3_2 nodes from am437x-gp-evm.dts and am43x-epos-evm.dts George Cherian (5): doc: Add "ti,am437x-dwc3" comaptible for dwc3 glue ARM: dts: am43xx clock data ARM: dts: AM4372: Add USB nodes ARM: dts: am437x-gp-evm: Enable USB ARM: dts: am43x-epos-evm: Enable USB Documentation/devicetree/bindings/usb/omap-usb.txt | 4 +- arch/arm/boot/dts/am4372.dtsi | 95 ++ arch/arm/boot/dts/am437x-gp-evm.dts| 18 arch/arm/boot/dts/am43x-epos-evm.dts | 18 arch/arm/boot/dts/am43xx-clocks.dtsi | 17 5 files changed, 151 insertions(+), 1 deletion(-) Can you please take this series. The whole series Reviewed-by: Roger Quadros -- -George -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC 4/6] sched: powerpc: create a dedicated topology table
On 03/11/2014 06:48 PM, Vincent Guittot wrote: > On 11 March 2014 11:08, Preeti U Murthy wrote: >> Hi Vincent, >> >> On 03/05/2014 12:48 PM, Vincent Guittot wrote: >>> Create a dedicated topology table for handling asymetric feature. >>> The current proposal creates a new level which describes which groups of >>> CPUs >>> take adavantge of SD_ASYM_PACKING. The useless level will be removed during >>> the >>> build of the sched_domain topology. >>> >>> Another solution would be to set SD_ASYM_PACKING in the sd_flags of SMT >>> level >>> during the boot sequence and before the build of the sched_domain topology. >> >> Is the below what you mean as the other solution? If it is so, I would >> strongly recommend this approach rather than adding another level to the >> topology level to represent the asymmetric behaviour. >> >> +static struct sched_domain_topology_level powerpc_topology[] = { >> +#ifdef CONFIG_SCHED_SMT >> + { cpu_smt_mask, SD_SHARE_CPUPOWER | SD_SHARE_PKG_RESOURCES, >> SD_INIT_NAME(SMT) | arch_sd_sibling_asym_packing() }, >> +#endif >> + { cpu_cpu_mask, SD_INIT_NAME(DIE) }, >> + { NULL, }, >> +}; > > Not exactly like that but something like below > > +static struct sched_domain_topology_level powerpc_topology[] = { > +#ifdef CONFIG_SCHED_SMT > + { cpu_smt_mask, SD_SHARE_CPUPOWER | SD_SHARE_PKG_RESOURCES, > SD_INIT_NAME(SMT) }, > +#endif > + { cpu_cpu_mask, SD_INIT_NAME(DIE) }, > + { NULL, }, > +}; > + > +static void __init set_sched_topology(void) > +{ > +#ifdef CONFIG_SCHED_SMT > + powerpc_topology[0].sd_flags |= arch_sd_sibling_asym_packing(); > +#endif > + sched_domain_topology = powerpc_topology; > +} I think we can set it in powerpc_topology[] and not bother about setting additional flags outside of this array. It is clearer this way. On an additional note, on powerpc we would want to clear the SD_SHARE_POWERDOMAIN flag at the CPU domain. On Power8, considering we have 8 threads per core, we would want to consolidate tasks atleast upto 4 threads without significant performance impact before spilling over to the other cores. By doing so, besides making use of the higher power of the core we could do cpuidle management at the core level for the remaining idle cores as a result of this consolidation. So the powerpc_topology[] would be something like the below: +static struct sched_domain_topology_level powerpc_topology[] = { +#ifdef CONFIG_SCHED_SMT + { cpu_smt_mask, SD_SHARE_CPUPOWER | SD_SHARE_PKG_RESOURCES, SD_INIT_NAME(SMT) | arch_sd_sibling_asym_packing() | SD_SHARE_POWERDOMAIN }, +#endif + { cpu_cpu_mask, SD_INIT_NAME(DIE) }, + { NULL, }, +}; The amount of consolidation to the threads in a core, we will probably take care of it in cpu capacity or a similar parameter, but the above topology level would be required to request the scheduler to try consolidating tasks to cores till the cpu capacity(3/4/5 threads) has exceeded. Regards Preeti U Murthy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] poll/wait/md: allow module to safely support 'poll' on /proc files
On Tue, 11 Mar 2014 21:19:24 -0700 Andrew Morton wrote: > On Wed, 12 Mar 2014 14:10:25 +1100 NeilBrown wrote: > > > On Tue, 11 Mar 2014 20:03:31 -0700 Andrew Morton > > wrote: > > > > > On Wed, 12 Mar 2014 13:36:38 +1100 NeilBrown wrote: > > > > > > > > > > > The md driver currently supports 'poll' on /proc/mdstat. > > > > This is unsafe as if the md-mod module is removed while a 'poll' > > > > or 'select' is outstanding on /proc/mdstat, an oops occurs > > > > when the syscall completes. > > > > poll_freewait() will call remove_wait_queue() on a wait_queue_head_t > > > > which was local to the module which no-longer exists. > > > > > > > > This problem is particular to /proc. Most filesystems do not > > > > allow the module to be unloaded while any files are open on it. > > > > /proc only blocks module unloading while a file_operations > > > > call is currently active into the module, not while the file is open. > > > > kernfs has this property too but kernfs allocates a wait_queue_head_t > > > > in its internal data structures so the module doesn't need to provide > > > > one. > > > > (A previous patch to add a similar allocation to procfs was not > > > > accepted). > > > > > > By who, me? I was hoping we could somehow keep the implementation > > > contained within md. I don't think I actually looked at it to any > > > significant extent! > > > > > > Was hoping that viro would pipe up. > > > > Was not accepted by anybody. Everybody is guilty :-) > > You were at least nice enough to comment (thanks). > > > > I think I like this version better so it might not be a problem that the > > previous version was not accepted. Depends on what the scheduler guys think > > though > > OK.. > > > > > ... > > > > > > > > +/** > > > > + * wait_queue_purge - remove all waiter from a wait_queue > > > > + * @q: The queue to be purged > > > > + * > > > > + * Unlink all pending waiters from the queue. > > > > + * This can be used prior to freeing a queue providing all waiters are > > > > + * prepared for queue purging. > > > > + * Waiters must call remove_wait_queue_puregeable() rather than > > > > + * remove_wait_queue(). > > > > + * > > > > + */ > > > > +void wait_queue_purge(wait_queue_head_t *q) > > > > +{ > > > > + spin_lock(>lock); > > > > + while (!list_empty(>task_list)) > > > > + list_del_init(q->task_list.next); > > > > + spin_unlock(>lock); > > > > + synchronize_rcu(); > > > > +} > > > > +EXPORT_SYMBOL(wait_queue_purge); > > > > > > I don't get this. If a task is waiting on that wait_queue_head_t, how > > > does it get woken? > > > > This is only expected to be used by tasks which have some other means of > > being woken up. Possibly a timeout passed to 'select' or 'poll', possibly a > > signal. > > Oh. So the caller is supposed to take the tasks off the queue via > wait_queue_purge(), then to wake them up (which implies the caller has > a second way of looking the tasks up). No. The caller of wait_queue_purge() doesn't care beyond purging the queue. The process that are waiting will be in 'select' or 'poll' or similar and there is no guarantee that anything will ever happen to wake them up. They can just keep waiting for all I care. I most cases they will have set their own timeout (or should have done). I could wake_up() the wait_queue before purging it. Then the callers would wake up, attempt IO, probably get EINVAL or something because the /proc file has been de-registered and hopefully move on with life. But that is really independent of the implementation of wait_queue_purge(). It is entirely possible for a process to be waiting on multiple events (And in the select/poll case it is very common) and if one event wants to say "this event is never ever going to happen so I'm detaching the queue", then there is no particular reason to do anything but detach the queue. > > And the tasks themselves ... do they need to know what happened? If > they run remove_wait_queue() then will still take > wait_queue_head_t.lock, so the calling task need to somehow keep the > wait_queue_head_t alive until everyone has woken and cleared off. The tasks themselves mustn't run remove_wait_queue(). They must run remove_wait_queue_purgeable(). This check if the remove has already happened and avoids taking the spinlock (which no longer exists) in that case. You cannot just call wait_queue_purge() on any old queue - only one that is known to be potentially purged and waiters know to use remove_wait_queue_purge(). Currently that is only wait_queues that are passed to poll_wait() inside a ->poll() method. > > Complex! Could we please get that all fleshed out in the changelog and > kerneldoc? I thought the important parts (the waiter having to call remove_wait_queue_purgeable()) already was in the kerneldoc. Thanks, NeilBrown > > > > > > > > +/** > > > > + * remove_wait_queue_puregeable - remove_wait_queue if > > > > wait_queue_purge might be
Re: [PATCH 4/9] powerpc/85xx: support CPU hotplug for e500mc and e5500
On Tue, Mar 11, 2014 at 06:48:13PM -0500, Scott Wood wrote: > On Fri, 2014-03-07 at 12:58 +0800, Chenhui Zhao wrote: > > diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c > > index ac2621a..f3f4401 100644 > > --- a/arch/powerpc/kernel/smp.c > > +++ b/arch/powerpc/kernel/smp.c > > @@ -405,8 +405,12 @@ void generic_cpu_die(unsigned int cpu) > > > > for (i = 0; i < 100; i++) { > > smp_rmb(); > > - if (per_cpu(cpu_state, cpu) == CPU_DEAD) > > + if (per_cpu(cpu_state, cpu) == CPU_DEAD) { > > +#ifdef CONFIG_PPC64 > > + paca[cpu].cpu_start = 0; > > +#endif > > Why wasn't this needed by previous ppc64 machines? If not clear, cpu can't start in the case of cpu hotpolug. The function pseries_cpu_die() in arch/powerpc/platforms/pseries/hotplug-cpu.c also clears the flag. > > > diff --git a/arch/powerpc/platforms/85xx/smp.c > > b/arch/powerpc/platforms/85xx/smp.c > > index 2e5911e..0047883 100644 > > --- a/arch/powerpc/platforms/85xx/smp.c > > +++ b/arch/powerpc/platforms/85xx/smp.c > > @@ -19,6 +19,7 @@ > > #include > > #include > > #include > > +#include > > > > #include > > #include > > @@ -46,6 +47,17 @@ static u64 timebase; > > static int tb_req; > > static int tb_valid; > > > > +#ifdef CONFIG_PPC_E500MC > > +/* specify the cpu PM state when cpu dies, PH15/NAP is the default */ > > +int qoriq_cpu_die_state = E500_PM_PH15; > > +#endif > > static? Is there any way to modify this other than modifying source > code? > > BTW, QorIQ doesn't imply an e500mc derivative. Will support e500, but for now these code support e500mc derivative in advance. Supposed qoriq_cpu_die_state can be changed by platform init code if the default value is not proper for a specific platform. > > > @@ -125,6 +138,34 @@ static void mpc85xx_take_timebase(void) > > } > > > > #ifdef CONFIG_HOTPLUG_CPU > > +#ifdef CONFIG_PPC_E500MC > > +static void qoriq_cpu_die(void) > > +{ > > + unsigned int cpu = smp_processor_id(); > > + > > + local_irq_disable(); > > +#ifdef CONFIG_PPC64 > > + __hard_irq_disable(); > > +#endif > > Why this instead of one call to hard_irq_disable() (no leading > underscores)? > > -Scott hard_irq_disable() will clear soft_enabled again. local_irq_disable() has cleared it. Will use hard_irq_disable() to replace these lines. local_irq_disable(); #ifdef CONFIG_PPC64 __hard_irq_disable(); #endif -Chenhui -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC][PATCH 0/7] locking: qspinlock
On Tue, Mar 11, 2014 at 11:11:59PM -0400, Steven Rostedt wrote: > On Wed, 12 Mar 2014 13:31:53 +1100 > Dave Chinner wrote: > > > > So either this patchset doesn't work right now, or there's something > > else broken in the tip/master tree... > > I've found a few things broken with the tip master tree. Anyway, I'm > not sure the patches are even there. The last I saw, the patches are > still in RFC stage. Might want to take a known working kernel and apply > the patches manually. I did apply them manually - but the patchset is based on the tip/master, plus some patches from a previous patch set that aren't in tip/locking to be able to apply this patchset cleanly in the first place. So there's no "start froma known working kernel" case that applies here :/ Cheers, Dave. -- Dave Chinner da...@fromorbit.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v2 4/4] ARM: S3C24XX: remove S3C24XX specific clock Kconfig options
This patch removes S3C24XX specific clock Kconfig options as it has been moved into "drivers/clk/samsung/Kconfig" also removes COMMON_CLK selection as COMMON_CLK_SAMSUNG is selecting it's dependency. CC: Ben Dooks CC: Kukjin Kim CC: Russell King Signed-off-by: Pankaj Dubey --- arch/arm/mach-s3c24xx/Kconfig | 14 -- 1 file changed, 14 deletions(-) diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig index 80373da..2d1232e 100644 --- a/arch/arm/mach-s3c24xx/Kconfig +++ b/arch/arm/mach-s3c24xx/Kconfig @@ -39,7 +39,6 @@ config CPU_S3C2410 config CPU_S3C2412 bool "SAMSUNG S3C2412" - select COMMON_CLK select CPU_ARM926T select CPU_LLSERIAL_S3C2440 select S3C2412_COMMON_CLK @@ -50,7 +49,6 @@ config CPU_S3C2412 config CPU_S3C2416 bool "SAMSUNG S3C2416/S3C2450" - select COMMON_CLK select CPU_ARM926T select CPU_LLSERIAL_S3C2440 select S3C2416_PM if PM @@ -88,7 +86,6 @@ config CPU_S3C244X config CPU_S3C2443 bool "SAMSUNG S3C2443" - select COMMON_CLK select CPU_ARM920T select CPU_LLSERIAL_S3C2440 select S3C2443_COMMON_CLK @@ -364,11 +361,6 @@ config S3C2412_PM_SLEEP if CPU_S3C2412 -config S3C2412_COMMON_CLK - bool - help - Build the s3c2412 clock driver based on the common clock framework. - config CPU_S3C2412_ONLY bool depends on !CPU_S3C2410 && !CPU_S3C2416 && !CPU_S3C2440 && \ @@ -651,12 +643,6 @@ endif # CPU_S3C2442 if CPU_S3C2443 || CPU_S3C2416 -config S3C2443_COMMON_CLK - bool - help - Temporary symbol to build the clock driver based on the common clock - framework. - config S3C2443_DMA bool help -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v2 3/4] ARM: select COMMON_CLK_SAMSUNG for ARCH_EXYNOS and ARCH_S3C64XX
This patch selects COMMON_CLK_SAMSUNG for EXYNOS and S3C64XX SoC and removes COMMON_CLK selection as COMMON_CLK_SAMSUNG selects it's dependency. CC: Russell King Signed-off-by: Pankaj Dubey --- arch/arm/Kconfig |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e254198..0c15aa7 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -755,7 +755,7 @@ config ARCH_S3C64XX select ARM_VIC select CLKDEV_LOOKUP select CLKSRC_SAMSUNG_PWM - select COMMON_CLK + select COMMON_CLK_SAMSUNG select CPU_V6K select GENERIC_CLOCKEVENTS select GPIO_SAMSUNG @@ -834,7 +834,7 @@ config ARCH_EXYNOS select ARCH_REQUIRE_GPIOLIB select ARCH_SPARSEMEM_ENABLE select ARM_GIC - select COMMON_CLK + select COMMON_CLK_SAMSUNG select CPU_V7 select GENERIC_CLOCKEVENTS select HAVE_S3C2410_I2C if I2C -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v2 1/4] clk: samsung: add new Kconfig for Samsung common clock options
This patch adds new Kconfig file for adding new config option as COMMON_CLK_SAMSUNG for Samsung common clock. This patch also moves S3C24XX specific clock options here in this file. Signed-off-by: Pankaj Dubey --- drivers/clk/samsung/Kconfig | 11 +++ 1 file changed, 11 insertions(+) create mode 100644 drivers/clk/samsung/Kconfig diff --git a/drivers/clk/samsung/Kconfig b/drivers/clk/samsung/Kconfig new file mode 100644 index 000..26eb446 --- /dev/null +++ b/drivers/clk/samsung/Kconfig @@ -0,0 +1,11 @@ +config COMMON_CLK_SAMSUNG + bool + select COMMON_CLK + +config S3C2412_COMMON_CLK + bool + select COMMON_CLK_SAMSUNG + +config S3C2443_COMMON_CLK + bool + select COMMON_CLK_SAMSUNG -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v2 2/4] drivers: clk: use CONFIG_COMMON_CLK_SAMSUNG for Samsung clock support
This patch includes Samsung clock Kconfig file, and replaces PLAT_SAMSUNG with COMMON_CLK_SAMSUNG for Samsung common clock support. Any Samsung SoC want to use Samsung common clock infrastructure can simply select COMMON_CLK_SAMSUNG. Signed-off-by: Pankaj Dubey --- drivers/clk/Kconfig |2 ++ drivers/clk/Makefile |2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig index 7641965..f2b6179 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -112,3 +112,5 @@ source "drivers/clk/qcom/Kconfig" endmenu source "drivers/clk/mvebu/Kconfig" + +source "drivers/clk/samsung/Kconfig" diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile index a367a98..f1da6ee 100644 --- a/drivers/clk/Makefile +++ b/drivers/clk/Makefile @@ -38,7 +38,7 @@ obj-$(CONFIG_PLAT_ORION) += mvebu/ obj-$(CONFIG_ARCH_MXS) += mxs/ obj-$(CONFIG_COMMON_CLK_QCOM) += qcom/ obj-$(CONFIG_ARCH_ROCKCHIP)+= rockchip/ -obj-$(CONFIG_PLAT_SAMSUNG) += samsung/ +obj-$(CONFIG_COMMON_CLK_SAMSUNG) += samsung/ obj-$(CONFIG_ARCH_SHMOBILE_MULTI) += shmobile/ obj-$(CONFIG_ARCH_SIRF)+= sirf/ obj-$(CONFIG_ARCH_SOCFPGA) += socfpga/ -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v2 0/4] Introduce new Kconfig for Samsung common clock
Introduce a new Kconfig file for Samsung common clock infrastructure related config options. As current Samsung common clock gets compiled based on PLAT_SAMSUNG, but moving ahead with ARM64 we can not have any more such config options, so this patch introduce new COMMON_CLK_SAMSUNG invisible option. This option also select COMMON_CLK so ARCH Kconfig just need to select COMMON_CLK_SAMSUNG in case they want to use Samsung common clock. This series is based on Kukjin's for-next branch. V2: 1) Adding new Kconfig file for Samsung common clock. 2) Make COMMON_CLK_SAMSUNG option invisible. (as suggested by Tomasz Figa) 3) Let COMMON_CLK_SAMSUNG select COMMON_CLK. (as suggested by Tomasz Figa) 4) Move S3C24XX clock config option in new Kconfig file. Pankaj Dubey (4): clk: samsung: add new Kconfig for Samsung common clock options drivers: clk: use CONFIG_COMMON_CLK_SAMSUNG for Samsung clock support ARM: select COMMON_CLK_SAMSUNG for ARCH_EXYNOS and ARCH_S3C64XX ARM: S3C24XX: remove S3C24XX specific clock Kconfig options arch/arm/Kconfig |4 ++-- arch/arm/mach-s3c24xx/Kconfig | 14 -- drivers/clk/Kconfig |2 ++ drivers/clk/Makefile |2 +- drivers/clk/samsung/Kconfig | 11 +++ 5 files changed, 16 insertions(+), 17 deletions(-) create mode 100644 drivers/clk/samsung/Kconfig -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] poll/wait/md: allow module to safely support 'poll' on /proc files
On Wed, 12 Mar 2014 14:10:25 +1100 NeilBrown wrote: > On Tue, 11 Mar 2014 20:03:31 -0700 Andrew Morton > wrote: > > > On Wed, 12 Mar 2014 13:36:38 +1100 NeilBrown wrote: > > > > > > > > The md driver currently supports 'poll' on /proc/mdstat. > > > This is unsafe as if the md-mod module is removed while a 'poll' > > > or 'select' is outstanding on /proc/mdstat, an oops occurs > > > when the syscall completes. > > > poll_freewait() will call remove_wait_queue() on a wait_queue_head_t > > > which was local to the module which no-longer exists. > > > > > > This problem is particular to /proc. Most filesystems do not > > > allow the module to be unloaded while any files are open on it. > > > /proc only blocks module unloading while a file_operations > > > call is currently active into the module, not while the file is open. > > > kernfs has this property too but kernfs allocates a wait_queue_head_t > > > in its internal data structures so the module doesn't need to provide > > > one. > > > (A previous patch to add a similar allocation to procfs was not > > > accepted). > > > > By who, me? I was hoping we could somehow keep the implementation > > contained within md. I don't think I actually looked at it to any > > significant extent! > > > > Was hoping that viro would pipe up. > > Was not accepted by anybody. Everybody is guilty :-) > You were at least nice enough to comment (thanks). > > I think I like this version better so it might not be a problem that the > previous version was not accepted. Depends on what the scheduler guys think > though OK.. > > > ... > > > > > > +/** > > > + * wait_queue_purge - remove all waiter from a wait_queue > > > + * @q: The queue to be purged > > > + * > > > + * Unlink all pending waiters from the queue. > > > + * This can be used prior to freeing a queue providing all waiters are > > > + * prepared for queue purging. > > > + * Waiters must call remove_wait_queue_puregeable() rather than > > > + * remove_wait_queue(). > > > + * > > > + */ > > > +void wait_queue_purge(wait_queue_head_t *q) > > > +{ > > > + spin_lock(>lock); > > > + while (!list_empty(>task_list)) > > > + list_del_init(q->task_list.next); > > > + spin_unlock(>lock); > > > + synchronize_rcu(); > > > +} > > > +EXPORT_SYMBOL(wait_queue_purge); > > > > I don't get this. If a task is waiting on that wait_queue_head_t, how > > does it get woken? > > This is only expected to be used by tasks which have some other means of > being woken up. Possibly a timeout passed to 'select' or 'poll', possibly a > signal. Oh. So the caller is supposed to take the tasks off the queue via wait_queue_purge(), then to wake them up (which implies the caller has a second way of looking the tasks up). And the tasks themselves ... do they need to know what happened? If they run remove_wait_queue() then will still take wait_queue_head_t.lock, so the calling task need to somehow keep the wait_queue_head_t alive until everyone has woken and cleared off. Complex! Could we please get that all fleshed out in the changelog and kerneldoc? > > > > > +/** > > > + * remove_wait_queue_puregeable - remove_wait_queue if wait_queue_purge > > > might be used. > > > + * @q: the queue, which may already be purged, to remove from > > > + * @wait: the waiter to remove > > > + * > > > + * Remove a waiter from a queue if it hasn't already been purged. > > > + * If the queue has already been purged then task_list will be empty. > > > + * If it isn't then it is still safe to lock the queue and remove > > > + * the task. > > > + */ > > > +void remove_wait_queue_purgeable(wait_queue_head_t *q, wait_queue_t > > > *wait) > > > +{ > > > + unsigned long flags; > > > + > > > + rcu_read_lock(); > > > + if (!list_empty(>task_list)) { > > > + spin_lock_irqsave(>lock, flags); > > > > Mixture of spin_lock_irqsave() here and spin_lock() in > > wait_queue_purge() looks odd. > > True - I was copying remove_wait_queue(). Maybe I should have just called > remove_wait_queue() directly (we don't actually need that _init on the > list_del). lockdep should have complained about the spin_lock(). -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH net] r8169: fix the incorrect tx descriptor version
From: Hayes Wang Date: Tue, 11 Mar 2014 15:11:59 +0800 > The tx descriptor version of RTL8111B belong to RTL_TD_0. > > Signed-off-by: Hayes Wang Applied, thank you. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH net-next] r8152: support dumping the hw counters
From: Hayes Wang Date: Tue, 11 Mar 2014 16:24:19 +0800 > Add dumping the tally counter by ethtool. > > Signed-off-by: Hayes Wang Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2] tools/net/Makefile: Define PACKAGE to fix build problems
From: Markos Chandras Date: Tue, 11 Mar 2014 08:49:39 + > Fixes the following build problem with binutils-2.24 > > gcc -Wall -O2 -c -o bpf_jit_disasm.o bpf_jit_disasm.c > In file included from bpf_jit_disasm.c:25:0: > /usr/include/bfd.h:35:2: error: #error config.h must be included > before this header > #error config.h must be included before this header > > This is similar to commit 3ce711a6abc27abce1554e1d671a8762b7187690 > "perf tools: bfd.h/libbfd detection fails with recent binutils" > > See: https://sourceware.org/bugzilla/show_bug.cgi?id=14243 > > CC: David S. Miller > CC: Daniel Borkmann > CC: net...@vger.kernel.org > Acked-by: Daniel Borkmann > Signed-off-by: Markos Chandras Applied, thank you. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [alsa-devel] [PATCH] ASoC: simple-card: overwrite DAIFMT_MASTER of cpu_dai->fmt
Hi Nicolin > > static struct asoc_simple_card_info fsi_wm8978_info = { > > ... > > .daifmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM, > > .cpu_dai = { > > ... > > .fmt= SND_SOC_DAIFMT_IB_NF, > > }, > > .codec_dai = { > > ... > > .fmt= SND_SOC_DAIFMT_NB_NF, > > }, > > }; > > This would be better imo. > > And ideally we should also keep the xB_xF identical like Mark said > _identical_. > Just some cpu dai drivers might do an incorrect settings for it, like > regarding > NB as sampling on rising edge and IF as active low (I'm saying this without a > careful check though), which results people need to re-set bitclock-invert and > frame-invert if they switch the DAI format from left_j to i2s for example. Wow... I had misunderstood... I need to send fixup patch after lunch. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 3/9] powerpc/rcpm: add RCPM driver
On Tue, Mar 11, 2014 at 06:42:51PM -0500, Scott Wood wrote: > On Fri, 2014-03-07 at 12:57 +0800, Chenhui Zhao wrote: > > diff --git a/arch/powerpc/platforms/85xx/corenet_generic.c > > b/arch/powerpc/platforms/85xx/corenet_generic.c > > index b756f3d..3fdf9f3 100644 > > --- a/arch/powerpc/platforms/85xx/corenet_generic.c > > +++ b/arch/powerpc/platforms/85xx/corenet_generic.c > > @@ -56,6 +56,8 @@ void __init corenet_gen_setup_arch(void) > > > > swiotlb_detect_4g(); > > > > + fsl_rcpm_init(); > > + > > pr_info("%s board from Freescale Semiconductor\n", ppc_md.name); > > RCPM is not board-specific. Why is this in board code? Init the RCPM driver in the early stage before smp_init(). Because the time base sync calls a callback function .freeze_time_base() in the RCPM driver. Will use early_initcall() instead. > > > +static void rcpm_v1_cpu_enter_state(int cpu, int state) > > +{ > > + unsigned int hw_cpu = get_hard_smp_processor_id(cpu); > > + unsigned int mask = 1 << hw_cpu; > > + > > + switch (state) { > > + case E500_PM_PH10: > > + setbits32(_v1_regs->cdozcr, mask); > > + break; > > + case E500_PM_PH15: > > + setbits32(_v1_regs->cnapcr, mask); > > + break; > > + default: > > + pr_err("Unknown cpu PM state\n"); > > + break; > > + } > > +} > > Put __func__ in error messages -- and for "unknown value" type messages, > print the value. OK. > > > > +static int rcpm_v1_plat_enter_state(int state) > > +{ > > + u32 *pmcsr_reg = _v1_regs->powmgtcsr; > > + int ret = 0; > > + int result; > > + > > + switch (state) { > > + case PLAT_PM_SLEEP: > > + setbits32(pmcsr_reg, RCPM_POWMGTCSR_SLP); > > + > > + /* At this point, the device is in sleep mode. */ > > + > > + /* Upon resume, wait for RCPM_POWMGTCSR_SLP bit to be clear. */ > > + result = spin_event_timeout( > > + !(in_be32(pmcsr_reg) & RCPM_POWMGTCSR_SLP), 1, 10); > > + if (!result) { > > + pr_err("%s: timeout waiting for SLP bit to be > > cleared\n", > > + __func__); > > Why are you indenting continuation lines with only two spaces (and yet > still not aligning with anything)? Will align with the previous parenthesis. > > > + ret = -ETIMEDOUT; > > + } > > + break; > > + default: > > + pr_err("Unsupported platform PM state\n"); > > + ret = -EINVAL; > > + } > > + > > + return ret; > > +} > > + > > +static void rcpm_v1_freeze_time_base(int freeze) > > +{ > > + u32 *tben_reg = _v1_regs->ctbenr; > > + static u32 mask; > > + > > + if (freeze) { > > + mask = in_be32(tben_reg); > > + clrbits32(tben_reg, mask); > > + } else { > > + setbits32(tben_reg, mask); > > + } > > + > > + /* read back to push the previous write */ > > + in_be32(tben_reg); > > +} > > + > > +static void rcpm_v2_freeze_time_base(int freeze) > > +{ > > + u32 *tben_reg = _v2_regs->pctbenr; > > + static u32 mask; > > + > > + if (freeze) { > > + mask = in_be32(tben_reg); > > + clrbits32(tben_reg, mask); > > + } else { > > + setbits32(tben_reg, mask); > > + } > > + > > + /* read back to push the previous write */ > > + in_be32(tben_reg); > > +} > > It looks like the only difference between these two functions is how you > calculate tben_reg -- factor the rest out into a single function. Yes. Will factor them out into a single function. > > > +int fsl_rcpm_init(void) > > +{ > > + struct device_node *np; > > + > > + np = of_find_compatible_node(NULL, NULL, "fsl,qoriq-rcpm-2.0"); > > + if (np) { > > + rcpm_v2_regs = of_iomap(np, 0); > > + of_node_put(np); > > + if (!rcpm_v2_regs) > > + return -ENOMEM; > > + > > + qoriq_pm_ops = _rcpm_v2_ops; > > + > > + } else { > > + np = of_find_compatible_node(NULL, NULL, "fsl,qoriq-rcpm-1.0"); > > + if (np) { > > + rcpm_v1_regs = of_iomap(np, 0); > > + of_node_put(np); > > + if (!rcpm_v1_regs) > > + return -ENOMEM; > > + > > + qoriq_pm_ops = _rcpm_v1_ops; > > + > > + } else { > > + pr_err("%s: can't find the rcpm node.\n", __func__); > > + return -EINVAL; > > + } > > + } > > + > > + return 0; > > +} > > Why isn't this a proper platform driver? > > -Scott The RCPM is not a single function IP block, instead it is a collection of device run control and power management. It would be called by other drivers and functions. For example, the callback .freeze_time_base() need to be called at early stage of kernel init. Therefore, it would be better to init it at early stage. -Chenhui -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of
Re: [RESEND] Fast TSC calibration fails with v3.14-rc1 and later
Hi Julian, 於 二,2014-03-11 於 18:15 +0100,Julian Wollrath 提到: > Am Tue, 11 Mar 2014 14:56:41 +0100 (CET) > schrieb Thomas Gleixner : > > > Ok, via bisecting I found commit > > > 73f7d1ca32638028e3271f54616773727e2f9f26 (see below) to be the one > > > that introduced this regression. > > > > Interesting. I have no idea what's going on. But maybe can the ACPI > > folks shed some light on it. > My patch moved acpi_early_init() to before timekeeping_init() is for prepare the later using ACPI TAD to set system clock. I think that because acpi_early_init() setup SCI interrupt and enable acpi subsystem, it causes fast TSC calibration fail. > I have absolutely no idea, if it is the right thing to do and why it > works, but the patch below fixes the problem. Thank you for your help. > > > Cheers, > Julian Wollrath > > From 7664f495039d93adfce073e58840a46549904f04 Mon Sep 17 00:00:00 2001 > From: Julian Wollrath > Date: Tue, 11 Mar 2014 18:05:43 +0100 > Subject: [PATCH] Fix fast TSC calibration > > Since commit 73f7d1ca32638028e3271f54616773727e2f9f26 the fast TSC calibration > failed on a Thinkpad X121e with an AMD E450 APU. Moving acpi_early_init() > after > late_time_init() fixes this. > > Signed-off-by: Julian Wollrath > --- > init/main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/init/main.c b/init/main.c > index eb03090cdced..bf9d99148bd6 100644 > --- a/init/main.c > +++ b/init/main.c > @@ -561,7 +561,6 @@ asmlinkage void __init start_kernel(void) > init_timers(); > hrtimers_init(); > softirq_init(); > - acpi_early_init(); > timekeeping_init(); > time_init(); > sched_clock_postinit(); > @@ -609,6 +608,7 @@ asmlinkage void __init start_kernel(void) > numa_policy_init(); > if (late_time_init) > late_time_init(); > + acpi_early_init(); > sched_clock_init(); > calibrate_delay(); > pidmap_init(); The late_time_init() dependent on timekeeping_init(), if we don't want move acpi_early_init() before timekeeping_init() then just direct put it before efi_enter_virtual_mode() because we tested this changed. This patch restricts the position to run acpi_early_init() before timekeeping_init() when only "CMOS RTC Not Present" bit set in FADT. Could you please help to test it on your machine? Thanks a lot! Joey Lee >From 8ef4fff76dd2f50bef1e8eb9c96f3b0228a38401 Mon Sep 17 00:00:00 2001 From: Lee, Chun-Yi Date: Wed, 12 Mar 2014 11:36:32 +0800 Subject: [PATCH] ACPI / init: Run acpi_early_init() before timekeeping_init() when CMOS RTC Not Present bit set This is a variant patch from Rafael J. Wysocki's ACPI / init: Run acpi_early_init() before efi_enter_virtual_mode() According to Matt Fleming, if acpi_early_init() was executed before efi_enter_virtual_mode(), the EFI initialization could benefit from it, so Rafael's patch makes that happen. And, later we want accessing ACPI TAD device to set system clock, so move acpi_early_init() before timekeeping_init() when "CMOS RTC Not Present" bit set. This position is also before efi_enter_virtual_mode(). Signed-off-by: Lee, Chun-Yi --- init/main.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/init/main.c b/init/main.c index eb03090..e1b69d2 100644 --- a/init/main.c +++ b/init/main.c @@ -561,7 +561,9 @@ asmlinkage void __init start_kernel(void) init_timers(); hrtimers_init(); softirq_init(); - acpi_early_init(); + if (acpi_gbl_FADT.header.revision >= 5 && + acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_CMOS_RTC) + acpi_early_init(); timekeeping_init(); time_init(); sched_clock_postinit(); @@ -613,6 +615,9 @@ asmlinkage void __init start_kernel(void) calibrate_delay(); pidmap_init(); anon_vma_init(); + if (!(acpi_gbl_FADT.header.revision >= 5 && + acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_CMOS_RTC)) + acpi_early_init(); #ifdef CONFIG_X86 if (efi_enabled(EFI_RUNTIME_SERVICES)) efi_enter_virtual_mode(); -- 1.6.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: linux-next: build failure after merge of the driver-core tree
On Tue, 2014-03-11 at 18:50 -0700, Greg KH wrote: > On Wed, Mar 12, 2014 at 12:51:52AM +, Mark Brown wrote: > > Hi Greg, > > > > After merging the driver-core tree, today's linux-next build () > > failed like this on a PowerPC defconfig: > > > > HEAD is now at ceb98e684dec Merge remote-tracking branch > > 'driver-core/driver-core-next' > > GEN /home/broonie/next/powerpc_ppc64_defconfig/Makefile > > # > > # configuration written to .config > > # > > /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-elog.c: In > > function 'elog_ack_store': > > /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-elog.c:84:2: > > error: implicit declaration of function 'sysfs_schedule_callback' > > [-Werror=implicit-function-declaration] > > sysfs_schedule_callback(_obj->kobj, delay_release_kobj, > > ^ > > cc1: all warnings being treated as errors > > make[3]: *** [arch/powerpc/platforms/powernv/opal-elog.o] Error 1 > > make[3]: *** Waiting for unfinished jobs > > /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-dump.c: In > > function 'dump_ack_store': > > /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-dump.c:100:2: > > error: implicit declaration of function 'sysfs_schedule_callback' > > [-Werror=implicit-function-declaration] > > sysfs_schedule_callback(_obj->kobj, delay_release_kobj, > > ^ > > cc1: all warnings being treated as errors > > > > due to an interaction between d1ba277e7988908 (sysfs, driver-core: remove > > unused {sysfs|device}_schedule_callback_owner()) and 774fea1a38c6a5a8 > > (powerpc/powernv: Read OPAL error log and export it through sysfs) from the > > PowerPC tree. > > > > I reverted 774fea1a38c6a5a8 for today. > > Sounds like the powerpc tree also needs to stop using this function :) powerpc -next is a never-rebase branch, so we are somewhat stuffed here. How do you suggest we proceed ? I can't add a fix to powerpc-next to use the new function since it doesn't exist upstream yet. I would have to pull drivers-core-next in which I really don't want to do Can the removal of the function be delayed to -rc1 so we can properly do the fixup ? Or do you have the introduction of the new function in a topic branch I can pull in without the rest of drivers-core-next ? Cheers, Ben. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] x86, smp: fix misleading native_stop_other_cpus() description
The description should be for native_stop_other_cpus() instead of smp_reboot_interrupt(). Signed-off-by: Xie XiuQi --- arch/x86/kernel/smp.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c index 7c3a5a6..f295a18 100644 --- a/arch/x86/kernel/smp.c +++ b/arch/x86/kernel/smp.c @@ -164,10 +164,6 @@ static int smp_stop_nmi_callback(unsigned int val, struct pt_regs *regs) return NMI_HANDLED; } -/* - * this function calls the 'stop' function on all other CPUs in the system. - */ - asmlinkage void smp_reboot_interrupt(void) { ack_APIC_irq(); @@ -176,6 +172,9 @@ asmlinkage void smp_reboot_interrupt(void) irq_exit(); } +/* + * this function calls the 'stop' function on all other CPUs in the system. + */ static void native_stop_other_cpus(int wait) { unsigned long flags; -- 1.6.0.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [alsa-devel] [PATCH] ASoC: simple-card: overwrite DAIFMT_MASTER of cpu_dai->fmt
Hi Morimoto-san, On Tue, Mar 11, 2014 at 08:36:22PM -0700, Kuninori Morimoto wrote: > > Hi Mark > > > > > asoc-simple-card sound-cs42888.12: cpu : 2024000.esai / 4003 / 13200 > > > > asoc-simple-card sound-cs42888.12: codec : cs42888 / 1003 / 24576000 > > > > asoc-simple-card sound-cs42888.12: cs42888 <-> 2024000.esai mapping ok > > > > > cpu = 4003 : SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_LEFT_J > > > codec = 1003 : SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_LEFT_J > > > > > codec is master, cpu is slave... > > > what is problem ?? > > > Am I misunderstanding ? > > > > The C in those constants stands for CODEC and the values should be > > identical for both ends of the link. > > Wow ! really ?? > Then, is this settiting wrong ?? > > ${LINUX}/arch/arm/mach-shmobile/board-armadillo800eva.c :: fsi_wm8978_info > > static struct asoc_simple_card_info fsi_wm8978_info = { > ... > .daifmt = SND_SOC_DAIFMT_I2S, > .cpu_dai = { > ... > .fmt= SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF, > }, > .codec_dai = { > ... > .fmt= SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_NB_NF, > }, > }; > > It should be like this ? > > static struct asoc_simple_card_info fsi_wm8978_info = { > ... > .daifmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM, > .cpu_dai = { > ... > .fmt= SND_SOC_DAIFMT_IB_NF, > }, > .codec_dai = { > ... > .fmt= SND_SOC_DAIFMT_NB_NF, > }, > }; This would be better imo. And ideally we should also keep the xB_xF identical like Mark said _identical_. Just some cpu dai drivers might do an incorrect settings for it, like regarding NB as sampling on rising edge and IF as active low (I'm saying this without a careful check though), which results people need to re-set bitclock-invert and frame-invert if they switch the DAI format from left_j to i2s for example. Thank you, Nicolin Chen -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [RFC PATCH] mmc: core: Invoke sdio func driver's PM callbacks from the sdio bus
Hi Aaron, This patch is tested on Intel platform, and SDIO function driver's suspend/resume callback will only be called once, which fixed this issue. Previously, they can be called twice. Here is the tested-by: Tested-by: xiaoming wang Tested-by: Chuanxiao Dong Thanks Chuanxiao > -Original Message- > From: Lu, Aaron > Sent: Wednesday, March 12, 2014 10:36 AM > To: Ulf Hansson; linux-...@vger.kernel.org; Chris Ball; Liu, Chuansheng; Dong, > Chuanxiao > Cc: linux-kernel@vger.kernel.org; NeilBrown; Rafael J. Wysocki > Subject: Re: [RFC PATCH] mmc: core: Invoke sdio func driver's PM callbacks > from the > sdio bus > > Hi Chuansheng & Chuanxiao, > > Can you please help us testing this patch on your platform and let us know > the test > result? Thanks. > > -Aaron > > On 02/28/2014 07:49 PM, Ulf Hansson wrote: > > The sdio func device is added to the driver model after the card > > device. > > > > This means the sdio func device will be suspend before the card device > > and thus resumed after. The consequence are the mmc core don't > > explicity need to protect itself from receiving sdio requests in > > suspended state. Instead that can be handled from the sdio bus, which > > is thus invokes the PM callbacks instead of old dummy function. > > > > In the case were the sdio func driver don't implement the PM callbacks > > the mmc core will in the early phase of system suspend, remove the > > card from the driver model and thus power off it. > > > > Cc: Aaron Lu > > Cc: NeilBrown > > Cc: Rafael J. Wysocki > > Signed-off-by: Ulf Hansson > > --- > > > > Note, this patch has only been compile tested. Would appreciate if > > some with SDIO and a sdio func driver could help out to test this. > > Especially the libertas driver would be nice. > > > > --- > > drivers/mmc/core/sdio.c | 45 > > --- > > drivers/mmc/core/sdio_bus.c | 14 +- > > 2 files changed, 5 insertions(+), 54 deletions(-) > > > > diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index > > 4d721c6..9933e42 100644 > > --- a/drivers/mmc/core/sdio.c > > +++ b/drivers/mmc/core/sdio.c > > @@ -943,40 +943,21 @@ static int mmc_sdio_pre_suspend(struct mmc_host > *host) > > */ > > static int mmc_sdio_suspend(struct mmc_host *host) { > > - int i, err = 0; > > - > > - for (i = 0; i < host->card->sdio_funcs; i++) { > > - struct sdio_func *func = host->card->sdio_func[i]; > > - if (func && sdio_func_present(func) && func->dev.driver) { > > - const struct dev_pm_ops *pmops = func->dev.driver->pm; > > - err = pmops->suspend(>dev); > > - if (err) > > - break; > > - } > > - } > > - while (err && --i >= 0) { > > - struct sdio_func *func = host->card->sdio_func[i]; > > - if (func && sdio_func_present(func) && func->dev.driver) { > > - const struct dev_pm_ops *pmops = func->dev.driver->pm; > > - pmops->resume(>dev); > > - } > > - } > > - > > - if (!err && mmc_card_keep_power(host) && mmc_card_wake_sdio_irq(host)) > { > > + if (mmc_card_keep_power(host) && mmc_card_wake_sdio_irq(host)) { > > mmc_claim_host(host); > > sdio_disable_wide(host->card); > > mmc_release_host(host); > > } > > > > - if (!err && !mmc_card_keep_power(host)) > > + if (!mmc_card_keep_power(host)) > > mmc_power_off(host); > > > > - return err; > > + return 0; > > } > > > > static int mmc_sdio_resume(struct mmc_host *host) { > > - int i, err = 0; > > + int err = 0; > > > > BUG_ON(!host); > > BUG_ON(!host->card); > > @@ -1019,24 +1000,6 @@ static int mmc_sdio_resume(struct mmc_host *host) > > wake_up_process(host->sdio_irq_thread); > > mmc_release_host(host); > > > > - /* > > -* If the card looked to be the same as before suspending, then > > -* we proceed to resume all card functions. If one of them returns > > -* an error then we simply return that error to the core and the > > -* card will be redetected as new. It is the responsibility of > > -* the function driver to perform further tests with the extra > > -* knowledge it has of the card to confirm the card is indeed the > > -* same as before suspending (same MAC address for network cards, > > -* etc.) and return an error otherwise. > > -*/ > > - for (i = 0; !err && i < host->card->sdio_funcs; i++) { > > - struct sdio_func *func = host->card->sdio_func[i]; > > - if (func && sdio_func_present(func) && func->dev.driver) { > > - const struct dev_pm_ops *pmops = func->dev.driver->pm; > > - err = pmops->resume(>dev); > > - } > > - } > > - > > host->pm_flags &= ~MMC_PM_KEEP_POWER; > > return err; > > } > > diff --git a/drivers/mmc/core/sdio_bus.c
Re: [alsa-devel] [PATCH] ASoC: simple-card: overwrite DAIFMT_MASTER of cpu_dai->fmt
Hi Mark > > > asoc-simple-card sound-cs42888.12: cpu : 2024000.esai / 4003 / 13200 > > > asoc-simple-card sound-cs42888.12: codec : cs42888 / 1003 / 24576000 > > > asoc-simple-card sound-cs42888.12: cs42888 <-> 2024000.esai mapping ok > > > cpu = 4003 : SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_LEFT_J > > codec = 1003 : SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_LEFT_J > > > codec is master, cpu is slave... > > what is problem ?? > > Am I misunderstanding ? > > The C in those constants stands for CODEC and the values should be > identical for both ends of the link. Wow ! really ?? Then, is this settiting wrong ?? ${LINUX}/arch/arm/mach-shmobile/board-armadillo800eva.c :: fsi_wm8978_info static struct asoc_simple_card_info fsi_wm8978_info = { ... .daifmt = SND_SOC_DAIFMT_I2S, .cpu_dai = { ... .fmt= SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF, }, .codec_dai = { ... .fmt= SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_NB_NF, }, }; It should be like this ? static struct asoc_simple_card_info fsi_wm8978_info = { ... .daifmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM, .cpu_dai = { ... .fmt= SND_SOC_DAIFMT_IB_NF, }, .codec_dai = { ... .fmt= SND_SOC_DAIFMT_NB_NF, }, }; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/5] ARM: dts: exynos4x12: Add ADC's dt data to read raw data
Hi Tomasz, On 03/11/2014 09:20 PM, Tomasz Figa wrote: > Hi Chanwoo, > > On 11.03.2014 08:54, Chanwoo Choi wrote: >> This patch add ADC(Analog to Digital Converter)'s dt data to get raw data >> with IIO subsystem. Usually, ADC is used to check temperature, jack type, and >> so on. >> > > 8< --- > >> Register map >> - <0x126C 0x100> : ADC register's base address >> - <0x10020718 0x4> : ADC_PHY_CONTROL, TS-ADC control register address >> >> Clock >> - < 326> : ADC clock (clock name :'tsadc') >> >> Interrupt >> - INTG10[3] : ADC for General ADC > > --- >8 > > I don't think there is a need to include such data in commit message. A > commit message should say what is done and why it's done (and sometimes how > it's done, in case of some complex code being added) and I guess that's all. OK, I'll remove it on patch description. > >> >> Signed-off-by: Chanwoo Choi >> Signed-off-by: Kyungmin Park >> --- >> arch/arm/boot/dts/exynos4x12.dtsi | 12 >> 1 file changed, 12 insertions(+) >> >> diff --git a/arch/arm/boot/dts/exynos4x12.dtsi >> b/arch/arm/boot/dts/exynos4x12.dtsi >> index 5c412aa..5a3e551 100644 >> --- a/arch/arm/boot/dts/exynos4x12.dtsi >> +++ b/arch/arm/boot/dts/exynos4x12.dtsi >> @@ -80,6 +80,18 @@ >> }; >> }; >> >> +adc: adc@126C { >> +compatible = "samsung,exynos-adc-v1"; >> +reg = <0x126C 0x100>, <0x10020718 0x4>; >> +interrupt-parent = <>; >> +interrupts = <10 3>; >> +clocks = < 326>; > > Please use clock macros instead of numbers, as introduced by Andrzej Hajda's > patches merged to Kgene's tree. > OK, I'll modify it. Thanks, Chanwoo Choi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 3/5] ARM: dts: exynos4x12: Add GPS_ALIVE power domain
Hi Tomasz, On 03/11/2014 09:28 PM, Tomasz Figa wrote: > Hi Chanwoo, > > On 11.03.2014 08:54, Chanwoo Choi wrote: >> This patch add GPS_ALIVE power domain for Exynos4x12 SoC. GPS_ALIVE power >> domain >> include GPS_BLK for GPS IP. Exynos SoC used generic power-domain driver to >> control power domain. After completed kernel booting, Exynos power-domain >> driver >> disable un-used power domain to reduce power-consumption/leak. >> >> If GPS_ALIVE power domain isn't registered to Exynos power-domain driver, >> happen power-leakage because GPS_ALIVE_CONFIGURATION is default power on >> state. >> >> - 0x10023D00 : GPS_ALIVE_CONFIGURATION register address >> >> Signed-off-by: Chanwoo Choi >> Signed-off-by: Kyungmin Park >> --- >> arch/arm/boot/dts/exynos4x12.dtsi | 5 + >> 1 file changed, 5 insertions(+) >> >> diff --git a/arch/arm/boot/dts/exynos4x12.dtsi >> b/arch/arm/boot/dts/exynos4x12.dtsi >> index 1ec77f6..066eb35 100644 >> --- a/arch/arm/boot/dts/exynos4x12.dtsi >> +++ b/arch/arm/boot/dts/exynos4x12.dtsi >> @@ -41,6 +41,11 @@ >> compatible = "samsung,exynos4210-pd"; >> reg = <0x10023CA0 0x20>; >> }; >> + >> +pd_gps_alive: gps-alive-power-domain@10023D00 { >> +compatible = "samsung,exynos4210-pd"; >> +reg = <0x10023D00 0x20>; >> +}; >> > > Exynos4210 seems to have this power domain as well, so I guess this change > should be done to exynos4.dtsi instead. > You are right. I will modify it. Thanks, Chanwoo Choi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCHv2 2/2] bridge: multicast: enable snooping on general queries only
From: Linus Lüssing Date: Mon, 10 Mar 2014 22:25:25 +0100 > Without this check someone could easily create a denial of service > by injecting multicast-specific queries to enable the bridge > snooping part if no real querier issuing periodic general queries > is present on the link which would result in the bridge wrongly > shutting down ports for multicast traffic as the bridge did not learn > about these listeners. > > With this patch the snooping code is enabled upon receiving valid, > general queries only. > > Signed-off-by: Linus Lüssing Applied. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCHv2 1/2] bridge: multicast: add sanity check for general query destination
From: Linus Lüssing Date: Mon, 10 Mar 2014 22:25:24 +0100 > General IGMP and MLD queries are supposed to have the multicast > link-local all-nodes address as their destination according to RFC2236 > section 9, RFC3376 section 4.1.12/9.1, RFC2710 section 8 and RFC3810 > section 5.1.15. > > Without this check, such malformed IGMP/MLD queries can result in a > denial of service: The queries are ignored by most IGMP/MLD listeners > therefore they will not respond with an IGMP/MLD report. However, > without this patch these malformed MLD queries would enable the > snooping part in the bridge code, potentially shutting down the > according ports towards these hosts for multicast traffic as the > bridge did not learn about these listeners. > > Reported-by: Jan Stancek > Signed-off-by: Linus Lüssing Applied. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC][PATCH 0/7] locking: qspinlock
On 03/11/2014 06:45 AM, Ingo Molnar wrote: * Peter Zijlstra wrote: Hi Waiman, I promised you this series a number of days ago; sorry for the delay I've been somewhat unwell :/ That said, these few patches start with a (hopefully) simple and correct form of the queue spinlock, and then gradually build upon it, explaining each optimization as we go. Having these optimizations as separate patches helps twofold; firstly it makes one aware of which exact optimizations were done, and secondly it allows one to proove or disprove any one step; seeing how they should be mostly identity transforms. The resulting code is near to what you posted I think; however it has one atomic op less in the pending wait-acquire case for NR_CPUS != huge. It also doesn't do lock stealing; its still perfectly fair afaict. Have I missed any tricks from your code? Waiman, you indicated in the other thread that these look good to you, right? If so then I can queue them up so that they form a base for further work. It would be nice to have per patch performance measurements though ... this split-up structure really enables that rather nicely. Thanks, Ingo As said by Peter, I haven't reviewed his change yet. The patch I am working on has an optimization that is similar to PeterZ's small NR_CPUS change. Except that I do a single atomic short integer write to switch the bits instead of 2 byte write. However, this code seems to have some problem working with the lockref code and I had panic happening in fs/dcache.c. So I am investigating that issue. I am also trying to revise the PV support to be similar to what is currently done in the PV ticketlock code. That is why I am kind of silent this past week. -Longman -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCHv3 resend 1/3] ASoC: codec: Simplify ASoC probe code.
> Subject: Re: [PATCHv3 resend 1/3] ASoC: codec: Simplify ASoC probe code. > > On Tue, Mar 11, 2014 at 12:43:20PM +0800, Xiubo Li wrote: > > For some CODEC drivers like who act as the MFDs children are ignored > > by this patch. > > Applied all, thanks. I'd generally recommend about putting things like > "resend" in the subject, it can make the prefix awfully long and hide > the actual subject. Yes, I will follow this. Thanks, -- Best Regards, Xiubo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC][PATCH 0/7] locking: qspinlock
On Wed, 12 Mar 2014 13:31:53 +1100 Dave Chinner wrote: > So either this patchset doesn't work right now, or there's something > else broken in the tip/master tree... I've found a few things broken with the tip master tree. Anyway, I'm not sure the patches are even there. The last I saw, the patches are still in RFC stage. Might want to take a known working kernel and apply the patches manually. -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] poll/wait/md: allow module to safely support 'poll' on /proc files
On Tue, 11 Mar 2014 20:03:31 -0700 Andrew Morton wrote: > On Wed, 12 Mar 2014 13:36:38 +1100 NeilBrown wrote: > > > > > The md driver currently supports 'poll' on /proc/mdstat. > > This is unsafe as if the md-mod module is removed while a 'poll' > > or 'select' is outstanding on /proc/mdstat, an oops occurs > > when the syscall completes. > > poll_freewait() will call remove_wait_queue() on a wait_queue_head_t > > which was local to the module which no-longer exists. > > > > This problem is particular to /proc. Most filesystems do not > > allow the module to be unloaded while any files are open on it. > > /proc only blocks module unloading while a file_operations > > call is currently active into the module, not while the file is open. > > kernfs has this property too but kernfs allocates a wait_queue_head_t > > in its internal data structures so the module doesn't need to provide > > one. > > (A previous patch to add a similar allocation to procfs was not > > accepted). > > By who, me? I was hoping we could somehow keep the implementation > contained within md. I don't think I actually looked at it to any > significant extent! > > Was hoping that viro would pipe up. Was not accepted by anybody. Everybody is guilty :-) You were at least nice enough to comment (thanks). I think I like this version better so it might not be a problem that the previous version was not accepted. Depends on what the scheduler guys think though > > > This patch takes a different approach and allows a module to > > disconnect the wait_queue_head_t that was passed to poll_wait() > > from all the clients which are waiting on it. Thus after calling > > proc_remove_entry("mdstat", NULL); > > we simply call > > wait_queue_purge(_event_waiters); > > > > and then know that it is safe to remove the module. > > > > rcu infrastructure is used to avoid races. > > poll_freewait() checks if the purge has happened under rcu_read_lock() > > to ensure that it never touches any freed memory. wait_queue_purge() > > uses synchronize_rcu() to ensure no poll_freewait() could still be > > looking at the wait_queue_head_t. > > > > ... > > > > +/** > > + * wait_queue_purge - remove all waiter from a wait_queue > > + * @q: The queue to be purged > > + * > > + * Unlink all pending waiters from the queue. > > + * This can be used prior to freeing a queue providing all waiters are > > + * prepared for queue purging. > > + * Waiters must call remove_wait_queue_puregeable() rather than > > + * remove_wait_queue(). > > + * > > + */ > > +void wait_queue_purge(wait_queue_head_t *q) > > +{ > > + spin_lock(>lock); > > + while (!list_empty(>task_list)) > > + list_del_init(q->task_list.next); > > + spin_unlock(>lock); > > + synchronize_rcu(); > > +} > > +EXPORT_SYMBOL(wait_queue_purge); > > I don't get this. If a task is waiting on that wait_queue_head_t, how > does it get woken? This is only expected to be used by tasks which have some other means of being woken up. Possibly a timeout passed to 'select' or 'poll', possibly a signal. > > > +/** > > + * remove_wait_queue_puregeable - remove_wait_queue if wait_queue_purge > > might be used. > > + * @q: the queue, which may already be purged, to remove from > > + * @wait: the waiter to remove > > + * > > + * Remove a waiter from a queue if it hasn't already been purged. > > + * If the queue has already been purged then task_list will be empty. > > + * If it isn't then it is still safe to lock the queue and remove > > + * the task. > > + */ > > +void remove_wait_queue_purgeable(wait_queue_head_t *q, wait_queue_t *wait) > > +{ > > + unsigned long flags; > > + > > + rcu_read_lock(); > > + if (!list_empty(>task_list)) { > > + spin_lock_irqsave(>lock, flags); > > Mixture of spin_lock_irqsave() here and spin_lock() in > wait_queue_purge() looks odd. True - I was copying remove_wait_queue(). Maybe I should have just called remove_wait_queue() directly (we don't actually need that _init on the list_del). > > > + list_del_init(>task_list); > > + spin_unlock_irqrestore(>lock, flags); > > + } > > + rcu_read_unlock(); > > +} > > +EXPORT_SYMBOL(remove_wait_queue_purgeable); Thanks, NeilBrown signature.asc Description: PGP signature
Re: [PATCH] hwmon, k10temp: Add support for AMD F16 M30h processor
On 03/11/2014 02:25 PM, Aravind Gopalakrishnan wrote: Adding new PCI ID to support AMD F16 M30h processor (Mullins). While at it, modify Kconfig and Doc files to reflect the support for newer processors Note: PCI ID for this processor will make it into pci_ids.h as part of this patch: http://marc.info/?l=linux-kernel=139291362126057=2 which should be pulled into 3.15 when merge window opens (It currently sits in 'for-next' branch of bp.git- https://git.kernel.org/cgit/linux/kernel/git/bp/bp.git/log/?h=for-next) Signed-off-by: Aravind Gopalakrishnan Looks good. We'll have to see how we can apply this; probably after 3.15-rc1 comes out. I'll put it into my -staging branch for now and pull in the other patch as well to make sure it compiles. Guenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v2] ASoC: simple-card: overwrite cpu_dai->fmt with codec_dai->fmt
The current simple-card driver separates the daimft for cpu_dai and codec_dai. So we might get different values for them (0x4003 and 0x1003 for example): asoc-simple-card sound-cs42888.12: cpu : 2024000.esai / 4003 / 13200 asoc-simple-card sound-cs42888.12: codec : cs42888 / 1003 / 24576000 asoc-simple-card sound-cs42888.12: cs42888 <-> 2024000.esai mapping ok This is not allowed at all as we need to keep the DAIFMT settings identical for both the ends of the link. Thus this patch fixes it by overwriting the cpu_dai->fmt with codec_dai->fmt since we defined the DAIFMT_MASTER basing on CODEC at the first place while the other bits are same. Signed-off-by: Nicolin Chen --- Changelog v2: * Keep the fmt identical for both CPU and CODEC sides. * Appended warning to binding doc. .../devicetree/bindings/sound/simple-card.txt| 6 ++ sound/soc/generic/simple-card.c | 20 ++-- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt index b30c222..881914b1 100644 --- a/Documentation/devicetree/bindings/sound/simple-card.txt +++ b/Documentation/devicetree/bindings/sound/simple-card.txt @@ -43,6 +43,12 @@ Optional CPU/CODEC subnodes properties: clock node (= common clock), or "system-clock-frequency" (if system doens't support common clock) +Note: + * For 'format', 'frame-master', 'bitclock-master', 'bitclock-inversion' and + 'frame-inversion', the simple card will use the settings of CODEC for both + CPU and CODEC sides as we need to keep the settings identical for both ends + of the link. + Example: sound { diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 5dd4769..09591ab 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -157,6 +157,8 @@ static int asoc_simple_card_parse_of(struct device_node *node, struct device *dev) { struct snd_soc_dai_link *dai_link = priv->snd_card.dai_link; + struct asoc_simple_dai *codec_dai = >codec_dai; + struct asoc_simple_dai *cpu_dai = >cpu_dai; struct device_node *np; char *name; int ret; @@ -189,7 +191,7 @@ static int asoc_simple_card_parse_of(struct device_node *node, np = of_get_child_by_name(node, "simple-audio-card,cpu"); if (np) ret = asoc_simple_card_sub_parse_of(np, priv->daifmt, - >cpu_dai, + cpu_dai, _link->cpu_of_node, _link->cpu_dai_name); if (ret < 0) @@ -200,12 +202,18 @@ static int asoc_simple_card_parse_of(struct device_node *node, np = of_get_child_by_name(node, "simple-audio-card,codec"); if (np) ret = asoc_simple_card_sub_parse_of(np, priv->daifmt, - >codec_dai, + codec_dai, _link->codec_of_node, _link->codec_dai_name); if (ret < 0) return ret; + /* +* overwrite cpu_dai->fmt as its DAIFMT_MASTER bit is based on CODEC +* while the other bits should be identical unless buggy SW/HW design. +*/ + cpu_dai->fmt = codec_dai->fmt; + if (!dai_link->cpu_dai_name || !dai_link->codec_dai_name) return -EINVAL; @@ -227,12 +235,12 @@ static int asoc_simple_card_parse_of(struct device_node *node, dev_dbg(dev, "platform : %04x\n", priv->daifmt); dev_dbg(dev, "cpu : %s / %04x / %d\n", dai_link->cpu_dai_name, - priv->cpu_dai.fmt, - priv->cpu_dai.sysclk); + cpu_dai->fmt, + cpu_dai->sysclk); dev_dbg(dev, "codec : %s / %04x / %d\n", dai_link->codec_dai_name, - priv->codec_dai.fmt, - priv->codec_dai.sysclk); + codec_dai->fmt, + codec_dai->sysclk); /* * soc_bind_dai_link() will check cpu name -- 1.8.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] poll/wait/md: allow module to safely support 'poll' on /proc files
On Wed, 12 Mar 2014 13:36:38 +1100 NeilBrown wrote: > > The md driver currently supports 'poll' on /proc/mdstat. > This is unsafe as if the md-mod module is removed while a 'poll' > or 'select' is outstanding on /proc/mdstat, an oops occurs > when the syscall completes. > poll_freewait() will call remove_wait_queue() on a wait_queue_head_t > which was local to the module which no-longer exists. > > This problem is particular to /proc. Most filesystems do not > allow the module to be unloaded while any files are open on it. > /proc only blocks module unloading while a file_operations > call is currently active into the module, not while the file is open. > kernfs has this property too but kernfs allocates a wait_queue_head_t > in its internal data structures so the module doesn't need to provide > one. > (A previous patch to add a similar allocation to procfs was not > accepted). By who, me? I was hoping we could somehow keep the implementation contained within md. I don't think I actually looked at it to any significant extent! Was hoping that viro would pipe up. > This patch takes a different approach and allows a module to > disconnect the wait_queue_head_t that was passed to poll_wait() > from all the clients which are waiting on it. Thus after calling > proc_remove_entry("mdstat", NULL); > we simply call > wait_queue_purge(_event_waiters); > > and then know that it is safe to remove the module. > > rcu infrastructure is used to avoid races. > poll_freewait() checks if the purge has happened under rcu_read_lock() > to ensure that it never touches any freed memory. wait_queue_purge() > uses synchronize_rcu() to ensure no poll_freewait() could still be > looking at the wait_queue_head_t. > > ... > > +/** > + * wait_queue_purge - remove all waiter from a wait_queue > + * @q: The queue to be purged > + * > + * Unlink all pending waiters from the queue. > + * This can be used prior to freeing a queue providing all waiters are > + * prepared for queue purging. > + * Waiters must call remove_wait_queue_puregeable() rather than > + * remove_wait_queue(). > + * > + */ > +void wait_queue_purge(wait_queue_head_t *q) > +{ > + spin_lock(>lock); > + while (!list_empty(>task_list)) > + list_del_init(q->task_list.next); > + spin_unlock(>lock); > + synchronize_rcu(); > +} > +EXPORT_SYMBOL(wait_queue_purge); I don't get this. If a task is waiting on that wait_queue_head_t, how does it get woken? > +/** > + * remove_wait_queue_puregeable - remove_wait_queue if wait_queue_purge > might be used. > + * @q: the queue, which may already be purged, to remove from > + * @wait: the waiter to remove > + * > + * Remove a waiter from a queue if it hasn't already been purged. > + * If the queue has already been purged then task_list will be empty. > + * If it isn't then it is still safe to lock the queue and remove > + * the task. > + */ > +void remove_wait_queue_purgeable(wait_queue_head_t *q, wait_queue_t *wait) > +{ > + unsigned long flags; > + > + rcu_read_lock(); > + if (!list_empty(>task_list)) { > + spin_lock_irqsave(>lock, flags); Mixture of spin_lock_irqsave() here and spin_lock() in wait_queue_purge() looks odd. > + list_del_init(>task_list); > + spin_unlock_irqrestore(>lock, flags); > + } > + rcu_read_unlock(); > +} > +EXPORT_SYMBOL(remove_wait_queue_purgeable); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] poll/wait/md: allow module to safely support 'poll' on /proc files
The md driver currently supports 'poll' on /proc/mdstat. This is unsafe as if the md-mod module is removed while a 'poll' or 'select' is outstanding on /proc/mdstat, an oops occurs when the syscall completes. poll_freewait() will call remove_wait_queue() on a wait_queue_head_t which was local to the module which no-longer exists. This problem is particular to /proc. Most filesystems do not allow the module to be unloaded while any files are open on it. /proc only blocks module unloading while a file_operations call is currently active into the module, not while the file is open. kernfs has this property too but kernfs allocates a wait_queue_head_t in its internal data structures so the module doesn't need to provide one. (A previous patch to add a similar allocation to procfs was not accepted). This patch takes a different approach and allows a module to disconnect the wait_queue_head_t that was passed to poll_wait() from all the clients which are waiting on it. Thus after calling proc_remove_entry("mdstat", NULL); we simply call wait_queue_purge(_event_waiters); and then know that it is safe to remove the module. rcu infrastructure is used to avoid races. poll_freewait() checks if the purge has happened under rcu_read_lock() to ensure that it never touches any freed memory. wait_queue_purge() uses synchronize_rcu() to ensure no poll_freewait() could still be looking at the wait_queue_head_t. Reported-by: "majianpeng" Signed-off-by: NeilBrown diff --git a/drivers/md/md.c b/drivers/md/md.c index 4ad5cc4e63e8..e28c9d2a1166 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -8681,6 +8681,7 @@ static __exit void md_exit(void) unregister_reboot_notifier(_notifier); unregister_sysctl_table(raid_table_header); remove_proc_entry("mdstat", NULL); + wait_queue_purge(_event_waiters); for_each_mddev(mddev, tmp) { export_array(mddev); mddev->hold_active = 0; diff --git a/fs/eventpoll.c b/fs/eventpoll.c index af903128891c..a095312d01e2 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -521,7 +521,7 @@ static void ep_remove_wait_queue(struct eppoll_entry *pwq) /* If it is cleared by POLLFREE, it should be rcu-safe */ whead = rcu_dereference(pwq->whead); if (whead) - remove_wait_queue(whead, >wait); + remove_wait_queue_purgeable(whead, >wait); rcu_read_unlock(); } diff --git a/fs/select.c b/fs/select.c index 467bb1cb3ea5..7c35bcdbd94c 100644 --- a/fs/select.c +++ b/fs/select.c @@ -129,7 +129,7 @@ EXPORT_SYMBOL(poll_initwait); static void free_poll_entry(struct poll_table_entry *entry) { - remove_wait_queue(entry->wait_address, >wait); + remove_wait_queue_purgeable(entry->wait_address, >wait); fput(entry->filp); } diff --git a/include/linux/wait.h b/include/linux/wait.h index 559044c79232..18d0d2fbf3bd 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -106,6 +106,8 @@ static inline int waitqueue_active(wait_queue_head_t *q) extern void add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait); extern void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t *wait); extern void remove_wait_queue(wait_queue_head_t *q, wait_queue_t *wait); +extern void wait_queue_purge(wait_queue_head_t *q); +extern void remove_wait_queue_purgeable(wait_queue_head_t *q, wait_queue_t *wait); static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new) { diff --git a/kernel/sched/wait.c b/kernel/sched/wait.c index 7d50f794e248..12548730c6ed 100644 --- a/kernel/sched/wait.c +++ b/kernel/sched/wait.c @@ -52,6 +52,51 @@ void remove_wait_queue(wait_queue_head_t *q, wait_queue_t *wait) EXPORT_SYMBOL(remove_wait_queue); +/** + * wait_queue_purge - remove all waiter from a wait_queue + * @q: The queue to be purged + * + * Unlink all pending waiters from the queue. + * This can be used prior to freeing a queue providing all waiters are + * prepared for queue purging. + * Waiters must call remove_wait_queue_puregeable() rather than + * remove_wait_queue(). + * + */ +void wait_queue_purge(wait_queue_head_t *q) +{ + spin_lock(>lock); + while (!list_empty(>task_list)) + list_del_init(q->task_list.next); + spin_unlock(>lock); + synchronize_rcu(); +} +EXPORT_SYMBOL(wait_queue_purge); + +/** + * remove_wait_queue_puregeable - remove_wait_queue if wait_queue_purge might be used. + * @q: the queue, which may already be purged, to remove from + * @wait: the waiter to remove + * + * Remove a waiter from a queue if it hasn't already been purged. + * If the queue has already been purged then task_list will be empty. + * If it isn't then it is still safe to lock the queue and remove + * the task. + */ +void remove_wait_queue_purgeable(wait_queue_head_t *q, wait_queue_t *wait) +{ + unsigned long flags; + + rcu_read_lock(); + if (!list_empty(>task_list)) { +
Re: [RFC PATCH] mmc: core: Invoke sdio func driver's PM callbacks from the sdio bus
Hi Chuansheng & Chuanxiao, Can you please help us testing this patch on your platform and let us know the test result? Thanks. -Aaron On 02/28/2014 07:49 PM, Ulf Hansson wrote: > The sdio func device is added to the driver model after the card > device. > > This means the sdio func device will be suspend before the card device > and thus resumed after. The consequence are the mmc core don't > explicity need to protect itself from receiving sdio requests in > suspended state. Instead that can be handled from the sdio bus, which > is thus invokes the PM callbacks instead of old dummy function. > > In the case were the sdio func driver don't implement the PM callbacks > the mmc core will in the early phase of system suspend, remove the > card from the driver model and thus power off it. > > Cc: Aaron Lu > Cc: NeilBrown > Cc: Rafael J. Wysocki > Signed-off-by: Ulf Hansson > --- > > Note, this patch has only been compile tested. Would appreciate if some with > SDIO and a sdio func driver could help out to test this. Especially the > libertas driver would be nice. > > --- > drivers/mmc/core/sdio.c | 45 > --- > drivers/mmc/core/sdio_bus.c | 14 +- > 2 files changed, 5 insertions(+), 54 deletions(-) > > diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c > index 4d721c6..9933e42 100644 > --- a/drivers/mmc/core/sdio.c > +++ b/drivers/mmc/core/sdio.c > @@ -943,40 +943,21 @@ static int mmc_sdio_pre_suspend(struct mmc_host *host) > */ > static int mmc_sdio_suspend(struct mmc_host *host) > { > - int i, err = 0; > - > - for (i = 0; i < host->card->sdio_funcs; i++) { > - struct sdio_func *func = host->card->sdio_func[i]; > - if (func && sdio_func_present(func) && func->dev.driver) { > - const struct dev_pm_ops *pmops = func->dev.driver->pm; > - err = pmops->suspend(>dev); > - if (err) > - break; > - } > - } > - while (err && --i >= 0) { > - struct sdio_func *func = host->card->sdio_func[i]; > - if (func && sdio_func_present(func) && func->dev.driver) { > - const struct dev_pm_ops *pmops = func->dev.driver->pm; > - pmops->resume(>dev); > - } > - } > - > - if (!err && mmc_card_keep_power(host) && mmc_card_wake_sdio_irq(host)) { > + if (mmc_card_keep_power(host) && mmc_card_wake_sdio_irq(host)) { > mmc_claim_host(host); > sdio_disable_wide(host->card); > mmc_release_host(host); > } > > - if (!err && !mmc_card_keep_power(host)) > + if (!mmc_card_keep_power(host)) > mmc_power_off(host); > > - return err; > + return 0; > } > > static int mmc_sdio_resume(struct mmc_host *host) > { > - int i, err = 0; > + int err = 0; > > BUG_ON(!host); > BUG_ON(!host->card); > @@ -1019,24 +1000,6 @@ static int mmc_sdio_resume(struct mmc_host *host) > wake_up_process(host->sdio_irq_thread); > mmc_release_host(host); > > - /* > - * If the card looked to be the same as before suspending, then > - * we proceed to resume all card functions. If one of them returns > - * an error then we simply return that error to the core and the > - * card will be redetected as new. It is the responsibility of > - * the function driver to perform further tests with the extra > - * knowledge it has of the card to confirm the card is indeed the > - * same as before suspending (same MAC address for network cards, > - * etc.) and return an error otherwise. > - */ > - for (i = 0; !err && i < host->card->sdio_funcs; i++) { > - struct sdio_func *func = host->card->sdio_func[i]; > - if (func && sdio_func_present(func) && func->dev.driver) { > - const struct dev_pm_ops *pmops = func->dev.driver->pm; > - err = pmops->resume(>dev); > - } > - } > - > host->pm_flags &= ~MMC_PM_KEEP_POWER; > return err; > } > diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c > index 92d1ba8..4fa8fef9 100644 > --- a/drivers/mmc/core/sdio_bus.c > +++ b/drivers/mmc/core/sdio_bus.c > @@ -197,20 +197,8 @@ static int sdio_bus_remove(struct device *dev) > > #ifdef CONFIG_PM > > -#ifdef CONFIG_PM_SLEEP > -static int pm_no_operation(struct device *dev) > -{ > - /* > - * Prevent the PM core from calling SDIO device drivers' suspend > - * callback routines, which it is not supposed to do, by using this > - * empty function as the bus type suspend callaback for SDIO. > - */ > - return 0; > -} > -#endif > - > static const struct dev_pm_ops sdio_bus_pm_ops = { > - SET_SYSTEM_SLEEP_PM_OPS(pm_no_operation, pm_no_operation) > +
Re: [PATCH 3.4 00/99] 3.4.83-stable review
On 03/11/2014 05:04 PM, Greg Kroah-Hartman wrote: Can you possibly add me to the cc: of your introductory e-mail announcing new stable releases ? Sometimes it seems to get lost and isn't available on any of the 'common' archives (this one did not make it to lkml, for example, and many of the individual mails didn't make it into the stable mailing list at gmane). Sure, now added. Thanks a lot, appreciate it! Guenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2] x86, calgary: use 8M TCE table size by default
On 03/10/14 at 10:26pm, Jon Mason wrote: > On Mon, Mar 10, 2014 at 8:54 AM, Muli Ben-Yehuda > wrote: > > Patch looks good to me. > > > > Acked-by: Muli Ben-Yehuda > > Me too (just in case you want us both). > > Acked-by: Jon Mason Thanks for review and helping push this change, to all of you. WANG Chao -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC][PATCH 0/7] locking: qspinlock
On Mon, Mar 10, 2014 at 04:42:36PM +0100, Peter Zijlstra wrote: > Hi Waiman, > > I promised you this series a number of days ago; sorry for the delay I've been > somewhat unwell :/ > > That said, these few patches start with a (hopefully) simple and correct form > of the queue spinlock, and then gradually build upon it, explaining each > optimization as we go. > > Having these optimizations as separate patches helps twofold; firstly it makes > one aware of which exact optimizations were done, and secondly it allows one > to > proove or disprove any one step; seeing how they should be mostly identity > transforms. > > The resulting code is near to what you posted I think; however it has one > atomic op less in the pending wait-acquire case for NR_CPUS != huge. It also > doesn't do lock stealing; its still perfectly fair afaict. > > Have I missed any tricks from your code? > > The patches apply to tip/master + > lkml.kernel.org/r/20140210195820.834693...@infradead.org FWIW, I saw this patchset referenced on LWN, and noted that the lock contention that AIM7 saw was in the VFS and XFS in particular. So, I pulled out my trusty "smash the VFS locks" test on a 16p VM. The multithreaded bulkstat test *hammers* the inode cache. I've got a filesystem with 51.2 million inodes in it, and it pegs all 16 CPUs with this profile: $ sudo time src/bstat -t -q /mnt/scratch 0.01user 2300.09system 2:28.13elapsed 1552%CPU (0avgtext+0avgdata 56268maxresident)k 0inputs+0outputs (12major+133515minor)pagefaults 0swaps $ . 73.95% [kernel] [k] _raw_spin_lock + 48.65% evict + 48.21% inode_sb_list_add + 1.31% inode_wait_for_writeback 0.51% __remove_inode_hash evict iput xfs_bulkstat_one_int xfs_bulkstat_one xfs_bulkstat xfs_ioc_bulkstat xfs_file_ioctl do_vfs_ioctl sys_ioctl system_call_fastpath __GI___ioctl + 4.87% [kernel] [k] native_read_tsc + 2.72% [kernel] [k] do_raw_spin_unlock + 2.36% [kernel] [k] _xfs_buf_find + 1.35% [kernel] [k] delay_tsc + 1.29% [kernel] [k] __crc32c_le + 1.19% [kernel] [k] __slab_alloc + 0.93% [kernel] [k] xfs_setup_inode + 0.73% [kernel] [k] _raw_spin_unlock_irqrestore It's almost entirely spinlock contention on the inode list lock, just like the AIM7 disk test that was referenced here: http://lwn.net/Articles/590268/ With the queuing spinlock, I expected to see somewhat better results, but I didn't at first. Turns out if you have any sort of lock debugging turned on, then the code doesn't ever go into the lock slow path and hence does not ever enter the "lock failed" slow path where all the contention fixes are supposed to be. Anyway, with all lock debugging turned off, the system hangs the instant I start the multithreaded bulkstat workload. Even the console is unrepsonsive. I did get a partial task trace, indicating everything was locked up on the contended lock: [ 64.992006] bstat R running task 5128 4488 4397 0x000a [ 64.992006] 88041b385a18 81ce6c81 88041b385a38 811bee8d [ 64.992006] 88041b385a58 8800b8527000 88041b385a58 814a0854 [ 64.992006] 002c80004321 8800b8527000 88041b385b08 8149998c [ 64.992006] Call Trace: [ 64.992006] [] ? _raw_spin_lock+0x21/0x30 [ 64.992006] [] inode_sb_list_add+0x1d/0x60 [ 64.992006] [] xfs_setup_inode+0x34/0x310 [ 64.992006] [] xfs_iget+0x4ec/0x750 [ 64.992006] [] ? xfs_setup_inode+0x310/0x310 [ 64.992006] [] xfs_bulkstat_one_int+0xa7/0x340 [ 64.992006] [] xfs_bulkstat_one+0x20/0x30 [ 64.992006] [] xfs_bulkstat+0x4bc/0xa10 [ 64.992006] [] ? xfs_bulkstat_one_int+0x340/0x340 [ 64.992006] [] xfs_ioc_bulkstat+0xd0/0x1b0 [ 64.992006] [] xfs_file_ioctl+0x3e4/0xae0 [ 64.992006] [] ? __do_page_fault+0x1fc/0x4f0 [ 64.992006] [] do_vfs_ioctl+0x83/0x500 [ 64.992006] [] SyS_ioctl+0x91/0xb0 [ 64.992006] [] system_call_fastpath+0x16/0x1b And the rest of the threads were in a cond_resched() right after the code where the lock was taken in teh evict path: [ 64.992006] bstat R running task 4576 4493 4397 0x [ 64.992006] 880419c95a48 0082 880419ec1820 00012e00 [ 64.992006] 880419c95fd8 00012e00 880419509820 880419ec1820 [ 64.992006] 880419c95a88 8800b8a8a1a8 8800b8a8a000 8800b8a8a1a8 [ 64.992006] Call Trace: [ 64.992006] [] _cond_resched+0x29/0x40 [ 64.992006] [] clear_inode+0x16/0x70 [ 64.992006] [] xfs_fs_evict_inode+0x59/0xf0 [ 64.992006] [] evict+0xaf/0x1b0 [ 64.992006] [] iput+0x103/0x190 [ 64.992006] [] ? xfs_setup_inode+0x310/0x310 [ 64.992006] [] xfs_bulkstat_one_int+0x287/0x340 [ 64.992006] [] xfs_bulkstat_one+0x20/0x30 [ 64.992006] [] xfs_bulkstat+0x4bc/0xa10 [ 64.992006] [] ?
Re: [PATCH 1/6] cputime: Fix nsecs_to_cputime() return type cast
On Thu, Mar 06, 2014 at 01:57:17PM -0500, Rik van Riel wrote: > On 03/06/2014 12:56 PM, Frederic Weisbecker wrote: > >Even though nsec based cputime_t maps to u64, nsecs_to_cputime() must > >return a cputime_t value. We want to enforce this kind of cast in order > >to track down buggy manipulations of cputime_t such as direct access > >of its values under wrong assumptions on its backend type (nsecs, > >jiffies, etc...) by core code. > > > >Cc: Ingo Molnar > >Cc: Marcelo Tosatti > >Cc: Peter Zijlstra > >Cc: Thomas Gleixner > >Signed-off-by: Frederic Weisbecker > > Acked-by: Rik van Riel > Thanks a lot for your acks. I added them for the pull request. Unfortunately git-send-email ignored them for the Cc (it seems to depend on the version). But the pull request can be found there: http://marc.info/?i=1394590202-772-1-git-send-email-fweisbec%40gmail.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2] ASoC: cs42888: Add codec driver support
>> On Mar 11, 2014, at 13:46, "Mark Brown" wrote: >> >> On Tue, Mar 11, 2014 at 04:55:58PM +0100, Lars-Peter Clausen wrote: >> On 03/11/2014 04:41 PM, Brian Austin wrote: > >>> So WRT the CS42888, this is one device in a series of 2 devices that are >>> register compatible with the only difference being that the CS42488 has 2 >>> extra ADC's. Same die and same DeviceID. > >>> Would it make more sense to submit the driver with the extra ADC's to make >>> it feature complete for both devices? Wouldn't be odd to have 2 drivers that >>> do the same for 98% of the code. > >> This should be in one driver. But support for the second device can >> always be added in a follow up patch. > > Yes, we can add support later. It might be helpful to name the driver > with some generic name I guess. CS42xx8 would work. We have a CS42448 and the CS42888. The difference is the 2 extra ADC's on the CS42448. I can add those later. I still would like to go over some of the v2 code though before a v3 is sent. Thanks Brian -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2] ASoC: cs42888: Add codec driver support
Hi Brian, On Wed, Mar 12, 2014 at 02:05:00AM +, Austin, Brian wrote: > > > >> On Mar 11, 2014, at 13:46, "Mark Brown" wrote: > >> > >> On Tue, Mar 11, 2014 at 04:55:58PM +0100, Lars-Peter Clausen wrote: > >> On 03/11/2014 04:41 PM, Brian Austin wrote: > > > >>> So WRT the CS42888, this is one device in a series of 2 devices that are > >>> register compatible with the only difference being that the CS42488 has 2 > >>> extra ADC's. Same die and same DeviceID. > > > >>> Would it make more sense to submit the driver with the extra ADC's to make > >>> it feature complete for both devices? Wouldn't be odd to have 2 drivers > >>> that > >>> do the same for 98% of the code. > > > >> This should be in one driver. But support for the second device can > >> always be added in a follow up patch. > > > > Yes, we can add support later. It might be helpful to name the driver > > with some generic name I guess. > CS42xx8 would work. > > We have a CS42448 and the CS42888. The difference is the 2 extra ADC's on the > CS42448. I can add those later. > > I still would like to go over some of the v2 code though before a v3 is sent. Actually I've already sent v3 right after this v2 due to some doc updating. Anyway, I'd love to wait for your comments against the patch before I send v3. Thank you, Nicolin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[GIT PULL] timers updates for 3.15
Ingo, Thomas, Please pull the timers/cputime-fix-steal-v2 branch that can be found at: git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git timers/cputime-fix-steal-v2 It's based on tip:timers/core. The patches are essentially unchanged since the last version (https://lkml.org/lkml/2014/3/6/376). I only added a small comment in 4/6 and acks from Rik. --- The main purpose of this set is to fix a bug on full dynticks configs where steal time accounting appears to be zero in /proc/stat even after a few seconds of competing guests running busy loops in a same host CPU. It's not a regression though as it was there since the beginning with full dynticks. So patch [4/6] ("cputime: Fix jiffies based cputime assumption on steal accounting") is the most important patch of the series. The rest is mostly preparatory work to fix the bug plus various cleanups. Thanks, Frederic --- Frederic Weisbecker (6): cputime: Fix nsecs_to_cputime() return type cast cputime: Default implementation of nsecs -> cputime conversion cputime: Bring cputime -> nsecs conversion cputime: Fix jiffies based cputime assumption on steal accounting sched: Remove needless round trip nsecs <-> tick conversion of steal time arch: Remove stub cputime.h headers arch/alpha/include/asm/Kbuild | 1 + arch/alpha/include/asm/cputime.h | 6 -- arch/cris/include/asm/Kbuild | 1 + arch/cris/include/asm/cputime.h | 6 -- arch/frv/include/asm/Kbuild | 1 + arch/frv/include/asm/cputime.h| 6 -- arch/m32r/include/asm/Kbuild | 1 + arch/m32r/include/asm/cputime.h | 6 -- arch/microblaze/include/asm/Kbuild| 1 + arch/microblaze/include/asm/cputime.h | 1 - arch/mn10300/include/asm/Kbuild | 1 + arch/mn10300/include/asm/cputime.h| 1 - arch/score/include/asm/Kbuild | 2 +- arch/score/include/asm/cputime.h | 6 -- arch/x86/include/asm/Kbuild | 1 + arch/x86/include/asm/cputime.h| 1 - drivers/cpufreq/cpufreq_stats.c | 2 +- drivers/s390/cio/cio.c| 2 +- fs/proc/stat.c| 2 +- fs/proc/uptime.c | 2 +- include/asm-generic/cputime_jiffies.h | 4 +++- include/asm-generic/cputime_nsecs.h | 5 - include/linux/cputime.h | 16 include/linux/kernel_stat.h | 2 +- include/linux/sched.h | 2 +- kernel/sched/core.c | 6 -- kernel/sched/cputime.c| 16 +++- kernel/sched/sched.h | 10 -- 28 files changed, 48 insertions(+), 63 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/6] cputime: Fix nsecs_to_cputime() return type cast
Even though nsec based cputime_t maps to u64, nsecs_to_cputime() must return a cputime_t value. We want to enforce this kind of cast in order to track down buggy manipulations of cputime_t such as direct access of its values under wrong assumptions on its backend type (nsecs, jiffies, etc...) by core code. Cc: Ingo Molnar Cc: Marcelo Tosatti Cc: Peter Zijlstra Cc: Thomas Gleixner Acked-by: Rik van Riel Signed-off-by: Frederic Weisbecker --- include/asm-generic/cputime_nsecs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/asm-generic/cputime_nsecs.h b/include/asm-generic/cputime_nsecs.h index 2c9e62c..768294f 100644 --- a/include/asm-generic/cputime_nsecs.h +++ b/include/asm-generic/cputime_nsecs.h @@ -44,7 +44,8 @@ typedef u64 __nocast cputime64_t; /* * Convert cputime <-> nanoseconds */ -#define nsecs_to_cputime(__nsecs) ((__force u64)(__nsecs)) +#define nsecs_to_cputime(__nsecs) \ + (__force cputime_t)(__nsecs) /* -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 3/6] cputime: Bring cputime -> nsecs conversion
We already have nsecs_to_cputime(). Now we need to be able to convert the other way around in order to fix a bug on steal time accounting. Cc: Ingo Molnar Cc: Marcelo Tosatti Cc: Peter Zijlstra Cc: Thomas Gleixner Acked-by: Rik van Riel Signed-off-by: Frederic Weisbecker --- include/asm-generic/cputime_jiffies.h | 4 +++- include/asm-generic/cputime_nsecs.h | 2 ++ include/linux/cputime.h | 5 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/asm-generic/cputime_jiffies.h b/include/asm-generic/cputime_jiffies.h index 272ecba..d5cb78f5 100644 --- a/include/asm-generic/cputime_jiffies.h +++ b/include/asm-generic/cputime_jiffies.h @@ -15,8 +15,10 @@ typedef u64 __nocast cputime64_t; /* - * Convert nanoseconds to cputime + * Convert nanoseconds <-> cputime */ +#define cputime_to_nsecs(__ct) \ + jiffies_to_nsecs(cputime_to_jiffies(__ct)) #define nsecs_to_cputime64(__nsec) \ jiffies64_to_cputime64(nsecs_to_jiffies64(__nsec)) #define nsecs_to_cputime(__nsec) \ diff --git a/include/asm-generic/cputime_nsecs.h b/include/asm-generic/cputime_nsecs.h index 768294f..4e81760 100644 --- a/include/asm-generic/cputime_nsecs.h +++ b/include/asm-generic/cputime_nsecs.h @@ -44,6 +44,8 @@ typedef u64 __nocast cputime64_t; /* * Convert cputime <-> nanoseconds */ +#define cputime_to_nsecs(__ct) \ + (__force u64)(__ct) #define nsecs_to_cputime(__nsecs) \ (__force cputime_t)(__nsecs) diff --git a/include/linux/cputime.h b/include/linux/cputime.h index 2842ebe..f2eb2ee 100644 --- a/include/linux/cputime.h +++ b/include/linux/cputime.h @@ -3,6 +3,11 @@ #include +#ifndef cputime_to_nsecs +# define cputime_to_nsecs(__ct)\ + (cputime_to_usecs(__ct) * NSEC_PER_USEC) +#endif + #ifndef nsecs_to_cputime # define nsecs_to_cputime(__nsecs) \ usecs_to_cputime((__nsecs) / NSEC_PER_USEC) -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] ASoC: simple-card: overwrite DAIFMT_MASTER of cpu_dai->fmt
On Tue, Mar 11, 2014 at 01:25:53PM +, Mark Brown wrote: > On Tue, Mar 11, 2014 at 08:54:32PM +0800, Nicolin Chen wrote: > > Adding Jyri who's been looking at this as well but not added anyone else > working on simple-card so you might've missed his mails. > > > It's pretty fair to do it for DAIFMT_INV since two dais might have differnt > > definitions in their drivers even though it'd be better to keep it same if > > we could. > > No, that's not at all OK - anything that requires this is broken. The > same DAI format should be usable by both ends of the link unless the > board itself is inverting one of the signals or something. That makes sense to me. Okay, I'll overwrite them all... > > > Thus this patch fixes it by overwriting the DAIFMT_MASTER bit of > > cpu_dai->fmt > > with the one of codec_dai->fmt since we defined DAIFMT_MASTER basing on > > CODEC > > at the first place. > > This seems closer to what I'd expect for something like this but it does > mean that any format settings on the CPU DAI will be ignored (rather > than say warning or something). I'm not sure this is a bad thing > though, probably wants the binding documenting at least. ...along with the binding doc. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 5/6] sched: Remove needless round trip nsecs <-> tick conversion of steal time
When update_rq_clock_task() accounts the pending steal time for a task, it converts the steal delta from nsecs to tick then from tick to nsecs. There is no apparent good reason for doing that though because both the task clock and the prev steal delta are u64 and store values in nsecs. So lets remove the needless conversion. Cc: Ingo Molnar Cc: Marcelo Tosatti Cc: Peter Zijlstra Cc: Thomas Gleixner Acked-by: Rik van Riel Signed-off-by: Frederic Weisbecker --- kernel/sched/core.c | 6 -- kernel/sched/sched.h | 10 -- 2 files changed, 16 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index b46131e..b14a188 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -823,19 +823,13 @@ static void update_rq_clock_task(struct rq *rq, s64 delta) #endif #ifdef CONFIG_PARAVIRT_TIME_ACCOUNTING if (static_key_false((_steal_rq_enabled))) { - u64 st; - steal = paravirt_steal_clock(cpu_of(rq)); steal -= rq->prev_steal_time_rq; if (unlikely(steal > delta)) steal = delta; - st = steal_ticks(steal); - steal = st * TICK_NSEC; - rq->prev_steal_time_rq += steal; - delta -= steal; } #endif diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index c2119fd..5ec9910 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1214,16 +1214,6 @@ extern void update_idle_cpu_load(struct rq *this_rq); extern void init_task_runnable_average(struct task_struct *p); -#ifdef CONFIG_PARAVIRT -static inline u64 steal_ticks(u64 steal) -{ - if (unlikely(steal > NSEC_PER_SEC)) - return div_u64(steal, TICK_NSEC); - - return __iter_div_u64_rem(steal, TICK_NSEC, ); -} -#endif - static inline void inc_nr_running(struct rq *rq) { rq->nr_running++; -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/6] cputime: Default implementation of nsecs -> cputime conversion
The architectures that override cputime_t (s390, ppc) don't provide any version of nsecs_to_cputime(). Indeed this cputime_t implementation by backend only happens when CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y under which the core code doesn't make any use of nsecs_to_cputime(). At least for now. We are going to make a broader use of it so lets provide a default version with a per usecs granularity. It should be good enough for most usecases. Cc: Ingo Molnar Cc: Marcelo Tosatti Cc: Peter Zijlstra Cc: Thomas Gleixner Acked-by: Rik van Riel Signed-off-by: Frederic Weisbecker --- drivers/cpufreq/cpufreq_stats.c | 2 +- drivers/s390/cio/cio.c | 2 +- fs/proc/stat.c | 2 +- fs/proc/uptime.c| 2 +- include/linux/cputime.h | 11 +++ include/linux/kernel_stat.h | 2 +- include/linux/sched.h | 2 +- 7 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 include/linux/cputime.h diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index 5793e14..79911a2 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include static spinlock_t cpufreq_stats_lock; diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index 88e35d8..5154513 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/fs/proc/stat.c b/fs/proc/stat.c index 6f599c6..9d231e9 100644 --- a/fs/proc/stat.c +++ b/fs/proc/stat.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #ifndef arch_irq_stat_cpu diff --git a/fs/proc/uptime.c b/fs/proc/uptime.c index 7141b8d..33de567 100644 --- a/fs/proc/uptime.c +++ b/fs/proc/uptime.c @@ -5,7 +5,7 @@ #include #include #include -#include +#include static int uptime_proc_show(struct seq_file *m, void *v) { diff --git a/include/linux/cputime.h b/include/linux/cputime.h new file mode 100644 index 000..2842ebe --- /dev/null +++ b/include/linux/cputime.h @@ -0,0 +1,11 @@ +#ifndef __LINUX_CPUTIME_H +#define __LINUX_CPUTIME_H + +#include + +#ifndef nsecs_to_cputime +# define nsecs_to_cputime(__nsecs) \ + usecs_to_cputime((__nsecs) / NSEC_PER_USEC) +#endif + +#endif /* __LINUX_CPUTIME_H */ diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index 51c72be..d7c6131 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h @@ -9,7 +9,7 @@ #include #include #include -#include +#include /* * 'kernel_stat.h' contains the definitions needed for doing diff --git a/include/linux/sched.h b/include/linux/sched.h index 68a0e84..1ac566c 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -27,7 +27,7 @@ struct sched_param { #include #include -#include +#include #include #include -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 6/6] arch: Remove stub cputime.h headers
Many architectures have a stub cputime.h that only include the default cputime.h Lets remove the useless headers, we only need to mention that we want the default headers on the Kbuild files. Cc: Archs Cc: Ingo Molnar Cc: Marcelo Tosatti Cc: Peter Zijlstra Cc: Thomas Gleixner Acked-by: Rik van Riel Signed-off-by: Frederic Weisbecker --- arch/alpha/include/asm/Kbuild | 1 + arch/alpha/include/asm/cputime.h | 6 -- arch/cris/include/asm/Kbuild | 1 + arch/cris/include/asm/cputime.h | 6 -- arch/frv/include/asm/Kbuild | 1 + arch/frv/include/asm/cputime.h| 6 -- arch/m32r/include/asm/Kbuild | 1 + arch/m32r/include/asm/cputime.h | 6 -- arch/microblaze/include/asm/Kbuild| 1 + arch/microblaze/include/asm/cputime.h | 1 - arch/mn10300/include/asm/Kbuild | 1 + arch/mn10300/include/asm/cputime.h| 1 - arch/score/include/asm/Kbuild | 2 +- arch/score/include/asm/cputime.h | 6 -- arch/x86/include/asm/Kbuild | 1 + arch/x86/include/asm/cputime.h| 1 - 16 files changed, 8 insertions(+), 34 deletions(-) delete mode 100644 arch/alpha/include/asm/cputime.h delete mode 100644 arch/cris/include/asm/cputime.h delete mode 100644 arch/frv/include/asm/cputime.h delete mode 100644 arch/m32r/include/asm/cputime.h delete mode 100644 arch/microblaze/include/asm/cputime.h delete mode 100644 arch/mn10300/include/asm/cputime.h delete mode 100644 arch/score/include/asm/cputime.h delete mode 100644 arch/x86/include/asm/cputime.h diff --git a/arch/alpha/include/asm/Kbuild b/arch/alpha/include/asm/Kbuild index a73a8e2..1a81a8b 100644 --- a/arch/alpha/include/asm/Kbuild +++ b/arch/alpha/include/asm/Kbuild @@ -5,3 +5,4 @@ generic-y += exec.h generic-y += trace_clock.h generic-y += preempt.h generic-y += hash.h +generic-y += cputime.h \ No newline at end of file diff --git a/arch/alpha/include/asm/cputime.h b/arch/alpha/include/asm/cputime.h deleted file mode 100644 index 19577fd..000 --- a/arch/alpha/include/asm/cputime.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __ALPHA_CPUTIME_H -#define __ALPHA_CPUTIME_H - -#include - -#endif /* __ALPHA_CPUTIME_H */ diff --git a/arch/cris/include/asm/Kbuild b/arch/cris/include/asm/Kbuild index f3fd876..9d02b45 100644 --- a/arch/cris/include/asm/Kbuild +++ b/arch/cris/include/asm/Kbuild @@ -14,3 +14,4 @@ generic-y += trace_clock.h generic-y += vga.h generic-y += xor.h generic-y += preempt.h +generic-y += cputime.h \ No newline at end of file diff --git a/arch/cris/include/asm/cputime.h b/arch/cris/include/asm/cputime.h deleted file mode 100644 index 4446a65..000 --- a/arch/cris/include/asm/cputime.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __CRIS_CPUTIME_H -#define __CRIS_CPUTIME_H - -#include - -#endif /* __CRIS_CPUTIME_H */ diff --git a/arch/frv/include/asm/Kbuild b/arch/frv/include/asm/Kbuild index bc42f14..c5eca98 100644 --- a/arch/frv/include/asm/Kbuild +++ b/arch/frv/include/asm/Kbuild @@ -4,3 +4,4 @@ generic-y += exec.h generic-y += trace_clock.h generic-y += preempt.h generic-y += hash.h +generic-y += cputime.h diff --git a/arch/frv/include/asm/cputime.h b/arch/frv/include/asm/cputime.h deleted file mode 100644 index f6c373a..000 --- a/arch/frv/include/asm/cputime.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_CPUTIME_H -#define _ASM_CPUTIME_H - -#include - -#endif /* _ASM_CPUTIME_H */ diff --git a/arch/m32r/include/asm/Kbuild b/arch/m32r/include/asm/Kbuild index 932435a..fda061d 100644 --- a/arch/m32r/include/asm/Kbuild +++ b/arch/m32r/include/asm/Kbuild @@ -5,3 +5,4 @@ generic-y += module.h generic-y += trace_clock.h generic-y += preempt.h generic-y += hash.h +generic-y += cputime.h \ No newline at end of file diff --git a/arch/m32r/include/asm/cputime.h b/arch/m32r/include/asm/cputime.h deleted file mode 100644 index 0a47550..000 --- a/arch/m32r/include/asm/cputime.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __M32R_CPUTIME_H -#define __M32R_CPUTIME_H - -#include - -#endif /* __M32R_CPUTIME_H */ diff --git a/arch/microblaze/include/asm/Kbuild b/arch/microblaze/include/asm/Kbuild index 2b98bc7..da88738a 100644 --- a/arch/microblaze/include/asm/Kbuild +++ b/arch/microblaze/include/asm/Kbuild @@ -6,3 +6,4 @@ generic-y += hash.h generic-y += trace_clock.h generic-y += syscalls.h generic-y += preempt.h +generic-y += cputime.h diff --git a/arch/microblaze/include/asm/cputime.h b/arch/microblaze/include/asm/cputime.h deleted file mode 100644 index 6d68ad7..000 --- a/arch/microblaze/include/asm/cputime.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/arch/mn10300/include/asm/Kbuild b/arch/mn10300/include/asm/Kbuild index 992e989..e076269 100644 --- a/arch/mn10300/include/asm/Kbuild +++ b/arch/mn10300/include/asm/Kbuild @@ -5,3 +5,4 @@ generic-y += exec.h generic-y += hash.h generic-y += trace_clock.h generic-y += preempt.h +generic-y += cputime.h \ No newline at end of file diff --git
[PATCH 4/6] cputime: Fix jiffies based cputime assumption on steal accounting
The steal guest time accounting code assumes that cputime_t is based on jiffies. So when CONFIG_NO_HZ_FULL=y, which implies that cputime_t is based on nsecs, steal_account_process_tick() passes the delta in jiffies to account_steal_time() which then accounts it as if it's a value in nsecs. As a result, accounting 1 second of steal time (with HZ=100 that would be 100 jiffies) is spuriously accounted as 100 nsecs. As such /proc/stat may report 0 values of steal time even when two guests have run concurrently for a few seconds on the same host and same CPU. In order to fix this, lets convert the nsecs based steal delta to cputime instead of jiffies by using the right conversion API. Given that the steal time is stored in cputime_t and this type can have a smaller granularity than nsecs, we only account the rounded converted value and leave the remaining nsecs for the next deltas. Reported-by: Huiqingding Reported-by: Marcelo Tosatti Cc: Ingo Molnar Cc: Marcelo Tosatti Cc: Peter Zijlstra Cc: Thomas Gleixner Acked-by: Rik van Riel Signed-off-by: Frederic Weisbecker --- kernel/sched/cputime.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c index 9994791..c91b097 100644 --- a/kernel/sched/cputime.c +++ b/kernel/sched/cputime.c @@ -258,16 +258,22 @@ static __always_inline bool steal_account_process_tick(void) { #ifdef CONFIG_PARAVIRT if (static_key_false(_steal_enabled)) { - u64 steal, st = 0; + u64 steal; + cputime_t steal_ct; steal = paravirt_steal_clock(smp_processor_id()); steal -= this_rq()->prev_steal_time; - st = steal_ticks(steal); - this_rq()->prev_steal_time += st * TICK_NSEC; + /* +* cputime_t may be less precise than nsecs (eg: if it's +* based on jiffies). Lets cast the result to cputime +* granularity and account the rest on the next rounds. +*/ + steal_ct = nsecs_to_cputime(steal); + this_rq()->prev_steal_time += cputime_to_nsecs(steal_ct); - account_steal_time(st); - return st; + account_steal_time(steal_ct); + return steal_ct; } #endif return false; -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2] ASoC: cs42888: Add codec driver support
On Tue, Mar 11, 2014 at 06:46:06PM +, Mark Brown wrote: > On Tue, Mar 11, 2014 at 04:55:58PM +0100, Lars-Peter Clausen wrote: > > On 03/11/2014 04:41 PM, Brian Austin wrote: > > > >So WRT the CS42888, this is one device in a series of 2 devices that are > > >register compatible with the only difference being that the CS42488 has 2 > > >extra ADC's. Same die and same DeviceID. > > > >Would it make more sense to submit the driver with the extra ADC's to make > > >it feature complete for both devices? Wouldn't be odd to have 2 drivers > > >that > > >do the same for 98% of the code. > > > This should be in one driver. But support for the second device can > > always be added in a follow up patch. > > Yes, we can add support later. It might be helpful to name the driver > with some generic name I guess. I didn't notice there's a sister model for CS42888. But good to know. And I think I should try cs42x88.c as the driver name, which makes sense even if we have another sister here. Or Brian may give me a more official one? It would be better if I also put those CS42488's support into the driver but I'll start a long vacation from tomorrow. So if I am not able to do that for CS42488's parts in the short time, I'll send the CS42888 part first by the end of the day and we can add CS42488 later. Thanks all, Nicolin Chen -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v5 0/7] arm64: Add ftrace support
On Wed, 12 Mar 2014 10:47:20 +0900 AKASHI Takahiro wrote: > This happens when a header file, elf.h, on "your host machine" does not have > definitions of EM_AARCH64 nor R_AARCH64_ABS64 because "recordmcount" is a > binary > utility on host(x86), not target. It is very likely for most distros. > (I mentioned this in the cover letter, but the description might not be > clear.) > > Possible solutions are: > 1) Define both macros directly in scripts/recordmcount.c > 2) Use perl version of recordmcount > > Currently I take 1), but it is a workaround. > 2) should work with my current patch, too. But you need to remove > HAVE_C_RECORDCOUNT > from arm64/Kconfig. > > Which one do you prefer? I will include a fix for 1) in the next revision, > anyway. Or even option 3) 3) I can update the main Makefile to check to see if EM_ exists in the elf.h header, and if not, we use the perl version and undef HAVE_C_RECORDMCOUNT. -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v5 0/7] arm64: Add ftrace support
On Wed, 12 Mar 2014 10:47:20 +0900 AKASHI Takahiro wrote: > This happens when a header file, elf.h, on "your host machine" does not have > definitions of EM_AARCH64 nor R_AARCH64_ABS64 because "recordmcount" is a > binary > utility on host(x86), not target. It is very likely for most distros. > (I mentioned this in the cover letter, but the description might not be > clear.) > > Possible solutions are: > 1) Define both macros directly in scripts/recordmcount.c > 2) Use perl version of recordmcount > > Currently I take 1), but it is a workaround. > 2) should work with my current patch, too. But you need to remove > HAVE_C_RECORDCOUNT > from arm64/Kconfig. > > Which one do you prefer? I will include a fix for 1) in the next revision, > anyway. > I'd recommend #1, where you add this: /* AARCH64 is new, and most headers don't define it. */ #ifndef EM_AARCH64 #define EM_AARCH64 ## #define R_AARCH64_ABS64 ## #endif Obviously fill in the blank for ## -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/3] spi: add xtfpga SPI controller driver
On Wed, Mar 12, 2014 at 05:43:49AM +0400, Max Filippov wrote: > On Wed, Mar 12, 2014 at 5:08 AM, Mark Brown wrote: > > That's buggy, drivers should never configure anything more than 8 bits > > per word with regmap. > Ok, so the driver should allow for 8 bit transfers and regmap will arrange > transfers as 8-bit pairs, making CS to be asserted for 16 bits, right? > Hmmm... I see the only way to support that with that hardware: advertise > 8 bit support, buffer bytes up to 16 bits, send 16 bit words on CS deassertion > request, log violations verbosely. Other ideas? That's about it. Like I keep saying for any sort of generic use you really want to support 8 bits per word. > > You're missing the point. The controller chip select line can do what > > it likes, it's not connected to the target device if a GPIO is being > > used. > In my case SPI controller is wired directly to the codec with three > wires: SDIN, SCLK and CS. There are no registers that can control > either of these wires independently of others. Right, but other users are likely to exist and the framework has support for this so it's not much work to support. signature.asc Description: Digital signature
linux-next: build failure after merge of the driver-core tree
Hi Greg, After merging the driver-core tree, today's linux-next build () failed like this on a PowerPC defconfig: HEAD is now at ceb98e684dec Merge remote-tracking branch 'driver-core/driver-core-next' GEN /home/broonie/next/powerpc_ppc64_defconfig/Makefile # # configuration written to .config # /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-elog.c: In function 'elog_ack_store': /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-elog.c:84:2: error: implicit declaration of function 'sysfs_schedule_callback' [-Werror=implicit-function-declaration] sysfs_schedule_callback(_obj->kobj, delay_release_kobj, ^ cc1: all warnings being treated as errors make[3]: *** [arch/powerpc/platforms/powernv/opal-elog.o] Error 1 make[3]: *** Waiting for unfinished jobs /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-dump.c: In function 'dump_ack_store': /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-dump.c:100:2: error: implicit declaration of function 'sysfs_schedule_callback' [-Werror=implicit-function-declaration] sysfs_schedule_callback(_obj->kobj, delay_release_kobj, ^ cc1: all warnings being treated as errors due to an interaction between d1ba277e7988908 (sysfs, driver-core: remove unused {sysfs|device}_schedule_callback_owner()) and 774fea1a38c6a5a8 (powerpc/powernv: Read OPAL error log and export it through sysfs) from the PowerPC tree. I reverted 774fea1a38c6a5a8 for today. pgpgbjT0LbmQ5.pgp Description: PGP signature
Re: [PATCH 3.4 00/99] 3.4.83-stable review
On Sat, Mar 08, 2014 at 09:10:00AM -0800, Guenter Roeck wrote: > On 03/08/2014 08:18 AM, Greg Kroah-Hartman wrote: > > On Sat, Mar 08, 2014 at 06:35:52AM -0800, Guenter Roeck wrote: > >> On 03/08/2014 01:47 AM, Satoru Takeuchi wrote: > >>> At Fri, 7 Mar 2014 17:06:56 -0800, > >>> Greg Kroah-Hartman wrote: > > This is the start of the stable review cycle for the 3.4.83 release. > There are 99 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know. > > Responses should be made by Mon Mar 10 01:05:53 UTC 2014. > Anything received after that time might be too late. > >>> > >>> This kernel passed my test. > >>> > >> > >> Same here. > >> > >> Built results: > >>total: 119 pass: 97 skipped: 18 fail: 4 > >> > >> qemu tests all passed. > >> > >> Details are available at http://server.roeck-us.net:8010/builders. > > > > Thanks to both of you for testing this, much appreciated. > > > > You are welcome. > > Can you possibly add me to the cc: of your introductory e-mail > announcing new stable releases ? Sometimes it seems to get lost > and isn't available on any of the 'common' archives (this one > did not make it to lkml, for example, and many of the individual > mails didn't make it into the stable mailing list at gmane). Sure, now added. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/3] spi: add xtfpga SPI controller driver
On Wed, Mar 12, 2014 at 12:20:49AM +0400, Max Filippov wrote: > On Tue, Mar 11, 2014 at 11:49 PM, Mark Brown wrote: > > On Tue, Mar 11, 2014 at 04:44:49PM +0400, Max Filippov wrote: > >> + unsigned long timeout = jiffies + msecs_to_jiffies(100); > >> + while (xtfpga_spi_read32(xspi, XTFPGA_SPI_BUSY)) { > >> + if (!time_before(jiffies, timeout)) > >> + return -EBUSY; > >> + else > >> + cpu_relax(); > >> + } > > So we'll busy wait for up to 100ms - that seems like an awfully long > > time. Perhaps fall back to msleep() if the delay is non-trivial (or > > just reduce the timeout)? > The timeout is here for the unlikely case everything went wrong. Normally > transfers get completed in about 10 useconds on 50 MHz hardware, it > doesn't seem worth msleeping here. I put the timeout here just because > otherwise infinite loop polling the device register looks scary. I appreciate that but even with 5MHz that's three orders of magnitude longer busy waiting in the error case than the operation is expected to take. If you must wait for that long busy wait for a bit then start sleeping. > > >> +/* Unused: this device controls its only CS automatically, > >> + * deactivating it after every 16 bit transfer completion. > >> + */ > > This is too limited to use with most SPI clients, they'll want to be > > able to transmit more than one word (and the fact that only 16 bit words > > are supported is also an issue, though that's easy enough to handle for > > a bitbanging driver - I'd really strongly suggest supporting 8 bits per > > word as well). Clients are pretty much going to need to use GPIO based > > chip select, you should make sure that's supported and covered in the > > binding. > There's no hardware for that. This device is really dumb, it is specifically > suited to control TLV320AIC23 which expects exactly 16 bit words, SPI > mode 0. This driver is not actually compatible with the tlv320aic23 driver since it needs 8 bit words, you need to at least support that. You don't need hardware in the controller to support a GPIO chip select, the whole point is that the controller chip select isn't wired up and a GPIO is used instead. > >> +static void xtfpga_spi_chipselect(struct spi_device *spi, int is_on) > >> +{ > >> +} > > Omit this since it's empty. > The bitbang side doesn't like when this callback is NULL and returns > -EINVAL from spi_bitbang_start. So fix that, but really it's trying to tell you that the hardware is far too limited to work with many things. signature.asc Description: Digital signature
Re: [PATCH 3.4 30/99] PCI: Enable INTx if BIOS left them disabled
On Sat, Mar 08, 2014 at 06:50:30AM -0700, Bjorn Helgaas wrote: > [+cc Andreas] > > On Fri, Mar 7, 2014 at 6:07 PM, Greg Kroah-Hartman > wrote: > > 3.4-stable review patch. If anyone has any objections, please let me know. > > Let's hold off on this for a bit. Andreas found that this patch > breaks pciehp, and we haven't figured out the best fix yet. > > http://lkml.kernel.org/r/camxnaaxd9-vbxsya9q1yvt+fwfdfykgg2hq-1jkc-awlx-h...@mail.gmail.com > https://bugzilla.kernel.org/show_bug.cgi?id=71691 Thanks for letting me know, now dropped. greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [alsa-devel] [PATCH] ASoC: simple-card: overwrite DAIFMT_MASTER of cpu_dai->fmt
On Tue, Mar 11, 2014 at 06:32:32PM -0700, Kuninori Morimoto wrote: > > The current simple-card driver separates the daimft for cpu_dai and > > codec_dai. > > So we might get different values for them (0x4003 and 0x1003 for example): > > > > asoc-simple-card sound-cs42888.12: cpu : 2024000.esai / 4003 / 13200 > > asoc-simple-card sound-cs42888.12: codec : cs42888 / 1003 / 24576000 > > asoc-simple-card sound-cs42888.12: cs42888 <-> 2024000.esai mapping ok > cpu = 4003 : SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_LEFT_J > codec = 1003 : SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_LEFT_J > codec is master, cpu is slave... > what is problem ?? > Am I misunderstanding ? The C in those constants stands for CODEC and the values should be identical for both ends of the link. signature.asc Description: Digital signature
Re: linux-next: build failure after merge of the driver-core tree
On Wed, Mar 12, 2014 at 12:51:52AM +, Mark Brown wrote: > Hi Greg, > > After merging the driver-core tree, today's linux-next build () > failed like this on a PowerPC defconfig: > > HEAD is now at ceb98e684dec Merge remote-tracking branch > 'driver-core/driver-core-next' > GEN /home/broonie/next/powerpc_ppc64_defconfig/Makefile > # > # configuration written to .config > # > /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-elog.c: In > function 'elog_ack_store': > /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-elog.c:84:2: > error: implicit declaration of function 'sysfs_schedule_callback' > [-Werror=implicit-function-declaration] > sysfs_schedule_callback(_obj->kobj, delay_release_kobj, > ^ > cc1: all warnings being treated as errors > make[3]: *** [arch/powerpc/platforms/powernv/opal-elog.o] Error 1 > make[3]: *** Waiting for unfinished jobs > /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-dump.c: In > function 'dump_ack_store': > /home/broonie/next/next/arch/powerpc/platforms/powernv/opal-dump.c:100:2: > error: implicit declaration of function 'sysfs_schedule_callback' > [-Werror=implicit-function-declaration] > sysfs_schedule_callback(_obj->kobj, delay_release_kobj, > ^ > cc1: all warnings being treated as errors > > due to an interaction between d1ba277e7988908 (sysfs, driver-core: remove > unused {sysfs|device}_schedule_callback_owner()) and 774fea1a38c6a5a8 > (powerpc/powernv: Read OPAL error log and export it through sysfs) from the > PowerPC tree. > > I reverted 774fea1a38c6a5a8 for today. Sounds like the powerpc tree also needs to stop using this function :) thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2] PM: Add missing "freeze" state
On Tuesday, March 11, 2014 02:13:59 PM Geert Uytterhoeven wrote: > Hi Pavel, > > On Tue, Mar 11, 2014 at 1:40 PM, Pavel Machek wrote: > > On Tue 2014-03-11 12:08:11, Geert Uytterhoeven wrote: > >> From: Geert Uytterhoeven > >> > >> Signed-off-by: Geert Uytterhoeven > > > > Acked-by: Pavel Machek > > Thanks! > > > Is it going to go in through the trivial tree? > > I didn't send this to trivial, so please take it through the PM tree. Queued up for 3.15 along with the other two commens cleanups in the runtime PM and hibernation code. Thanks! -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/3] spi: add xtfpga SPI controller driver
On Wed, Mar 12, 2014 at 5:11 AM, Mark Brown wrote: > On Wed, Mar 12, 2014 at 04:59:47AM +0400, Max Filippov wrote: > >> And tlv320aic23 has the following regmap: > >> const struct regmap_config tlv320aic23_regmap = { >> .reg_bits = 7, >> .val_bits = 9, > >> and its SPI interface accordingly does the following in .probe: > >> spi->bits_per_word = 16 >> spi->mode = SPI_MODE_0; >> ret = spi_setup(spi); > > So I just looked again - the SPI code isn't in mainline, there must > be some out of tree patches here that can't have been tested since the > driver was converted to regmap (or the byte swapping you're doing in the > controller is buggy for 16 bits per word). I'm successfully running this driver with the patches in your ASoC tree branch topic/tlv320aic23. -- Thanks. -- Max -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: linux-next: manual merge of the staging tree with the tree
On Wed, Mar 12, 2014 at 01:32:59AM +, Mark Brown wrote: > Hi Greg, > > Today's linux-next merge of the staging tree got a conflict in > drivers/staging/cxt1e1/linux.c between commit 084b6e7765b95 > ("staging/cxt1e1/linux.c: Correct arbitrary memory write in c4_ioctl()") from > Linus' tree and commit aa562fa70931d ("staging: cxt1e1: Fix no spaces at the > start of a line in linux.c") from the staging tree. > > I fixed it up (see below) and can carry the fix as necessary (no action > is required). Known issue, was reported previously and fixed up in linux-next and I will handle it when I merge my trees together... thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] power: add an API to log wakeup reasons
This API would be called from the platform specific code, or the driver for the interrupt controller, when the system resumes from the suspend because of an IRQ. We track the reasons for which systems wake up from the low power suspend mode. This is especially important on battery-powered consumer electronic devices. Analyzing the data helps us figure what caused the maximum wake ups and if something can be done about the same to improve the battery life. For instances, if the wi-fi network traffic or the radio traffic causes the system to frequently wakeup from the low-power mode. This is already in use on some Android devices. We are trying to make this a generic API which could be called by other platforms as well, standardizing the format in which the info is logged in dmesg and the format of the info exported to userspace for collecting power management statistics. Thanking you, Ruchi Kandoi On Tue, Mar 11, 2014 at 12:32 PM, Rafael J. Wysocki wrote: > On Monday, March 10, 2014 07:02:02 PM Ruchi Kandoi wrote: >> Add API log_wakeup_reason() and expose it to userspace via sysfs path >> /sys/kernel/wakeup_reasons/last_resume_reason >> This is useful for power management diagnostic purposes. > > What's the use case and how is it supposed to work? > >> Signed-off-by: Ruchi Kandoi >> Signed-off-by: Greg Hackmann >> --- >> include/linux/wakeup_reason.h | 23 +++ >> kernel/power/Makefile | 2 +- >> kernel/power/wakeup_reason.c | 140 >> ++ >> 3 files changed, 164 insertions(+), 1 deletion(-) >> create mode 100644 include/linux/wakeup_reason.h >> create mode 100644 kernel/power/wakeup_reason.c >> >> diff --git a/include/linux/wakeup_reason.h b/include/linux/wakeup_reason.h >> new file mode 100644 >> index 000..7ce50f0 >> --- /dev/null >> +++ b/include/linux/wakeup_reason.h >> @@ -0,0 +1,23 @@ >> +/* >> + * include/linux/wakeup_reason.h >> + * >> + * Logs the reason which caused the kernel to resume >> + * from the suspend mode. >> + * >> + * Copyright (C) 2014 Google, Inc. >> + * This software is licensed under the terms of the GNU General Public >> + * License version 2, as published by the Free Software Foundation, and >> + * may be copied, distributed, and modified under those terms. >> + * >> + * This program is distributed in the hope that it will be useful, >> + * but WITHOUT ANY WARRANTY; without even the implied warranty of >> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> + * GNU General Public License for more details. >> + */ >> + >> +#ifndef _LINUX_WAKEUP_REASON_H >> +#define _LINUX_WAKEUP_REASON_H >> + >> +void log_wakeup_reason(int irq); >> + >> +#endif /* _LINUX_WAKEUP_REASON_H */ >> diff --git a/kernel/power/Makefile b/kernel/power/Makefile >> index 29472bf..f98f021 100644 >> --- a/kernel/power/Makefile >> +++ b/kernel/power/Makefile >> @@ -5,7 +5,7 @@ obj-y += qos.o >> obj-$(CONFIG_PM) += main.o >> obj-$(CONFIG_VT_CONSOLE_SLEEP) += console.o >> obj-$(CONFIG_FREEZER)+= process.o >> -obj-$(CONFIG_SUSPEND)+= suspend.o >> +obj-$(CONFIG_SUSPEND)+= suspend.o wakeup_reason.o >> obj-$(CONFIG_PM_TEST_SUSPEND)+= suspend_test.o >> obj-$(CONFIG_HIBERNATION)+= hibernate.o snapshot.o swap.o user.o \ >> block_io.o >> diff --git a/kernel/power/wakeup_reason.c b/kernel/power/wakeup_reason.c >> new file mode 100644 >> index 000..188a6bf >> --- /dev/null >> +++ b/kernel/power/wakeup_reason.c >> @@ -0,0 +1,140 @@ >> +/* >> + * kernel/power/wakeup_reason.c >> + * >> + * Logs the reasons which caused the kernel to resume from >> + * the suspend mode. >> + * >> + * Copyright (C) 2014 Google, Inc. >> + * This software is licensed under the terms of the GNU General Public >> + * License version 2, as published by the Free Software Foundation, and >> + * may be copied, distributed, and modified under those terms. >> + * >> + * This program is distributed in the hope that it will be useful, >> + * but WITHOUT ANY WARRANTY; without even the implied warranty of >> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> + * GNU General Public License for more details. >> + */ >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> + >> +#define MAX_WAKEUP_REASON_IRQS 32 >> +static int irq_list[MAX_WAKEUP_REASON_IRQS]; >> +static int irqcount; >> +static struct kobject *wakeup_reason; >> +static spinlock_t resume_reason_lock; >> + >> +static ssize_t reason_show(struct kobject *kobj, struct kobj_attribute >> *attr, >> + char *buf) >> +{ >> + int irq_no, buf_offset = 0; >> + struct irq_desc *desc; >> + spin_lock(_reason_lock); >> + for (irq_no = 0; irq_no < irqcount; irq_no++) { >> + desc = irq_to_desc(irq_list[irq_no]); >> +
[PATCH v2] usb: gadget: tcm_usb_gadget: stop format strings
This makes sure that the name coming out of configfs cannot be used accidentally as a format string. Signed-off-by: Kees Cook Cc: sta...@vger.kernel.org --- v2: - with stable cc; Felipe Balbi. --- drivers/usb/gadget/tcm_usb_gadget.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/tcm_usb_gadget.c b/drivers/usb/gadget/tcm_usb_gadget.c index 0f8aad78b54f..460c266b8e24 100644 --- a/drivers/usb/gadget/tcm_usb_gadget.c +++ b/drivers/usb/gadget/tcm_usb_gadget.c @@ -1613,7 +1613,7 @@ static struct se_wwn *usbg_make_tport( return ERR_PTR(-ENOMEM); } tport->tport_wwpn = wwpn; - snprintf(tport->tport_name, sizeof(tport->tport_name), wnn_name); + snprintf(tport->tport_name, sizeof(tport->tport_name), "%s", wnn_name); return >tport_wwn; } -- 1.7.9.5 -- Kees Cook Chrome OS Security -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] PNPACPI: proper handling ACPI IO/Memory resources
On Tuesday, March 11, 2014 10:40:27 PM Zhang Rui wrote: > Before commit b355cee88e3b1a193f0e9a81db810f6f83ad728b, > if acpi_dev_resource_memory()/acpi_dev_resource_io() returns false, > it means the the resource is not a memeory/IO resource. > > But after commit b355cee88e3b1a193f0e9a81db810f6f83ad728b, > if the memory/IO resource is invalid (the length of the resource is zero), > acpi_dev_resource_memory()/acpi_dev_resource_io() returns false as well. > > This breaks pnpacpi_allocated_resource(), because the current code would > recognize the invalid memory/io resource as unknown resource type. > Thus users will get warning messages on machines with zero length > ACPI memeory/IO resources. > > This patch fixes the problem by invoking acpi_dev_resource_memory()/ > acpi_dev_resource_io() for ACPI memory/IO resources only. > > Signed-off-by: Zhang Rui Applied, thanks Rui! > --- > drivers/pnp/pnpacpi/rsparser.c | 15 --- > 1 file changed, 12 insertions(+), 3 deletions(-) > > diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c > index 167f3d0..66977eb 100644 > --- a/drivers/pnp/pnpacpi/rsparser.c > +++ b/drivers/pnp/pnpacpi/rsparser.c > @@ -183,9 +183,7 @@ static acpi_status pnpacpi_allocated_resource(struct > acpi_resource *res, > struct resource r = {0}; > int i, flags; > > - if (acpi_dev_resource_memory(res, ) > - || acpi_dev_resource_io(res, ) > - || acpi_dev_resource_address_space(res, ) > + if (acpi_dev_resource_address_space(res, ) > || acpi_dev_resource_ext_address_space(res, )) { > pnp_add_resource(dev, ); > return AE_OK; > @@ -217,6 +215,17 @@ static acpi_status pnpacpi_allocated_resource(struct > acpi_resource *res, > } > > switch (res->type) { > + case ACPI_RESOURCE_TYPE_MEMORY24: > + case ACPI_RESOURCE_TYPE_MEMORY32: > + case ACPI_RESOURCE_TYPE_FIXED_MEMORY32: > + if (acpi_dev_resource_memory(res, )) > + pnp_add_resource(dev, ); > + break; > + case ACPI_RESOURCE_TYPE_IO: > + case ACPI_RESOURCE_TYPE_FIXED_IO: > + if (acpi_dev_resource_io(res, )) > + pnp_add_resource(dev, ); > + break; > case ACPI_RESOURCE_TYPE_DMA: > dma = >data.dma; > if (dma->channel_count > 0 && dma->channels[0] != (u8) -1) > -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v3 2/5] mfd: add bcm590xx pmu driver
On Tue, Mar 11, 2014 at 07:25:45PM -0400, Matt Porter wrote: > On Tue, Mar 11, 2014 at 10:45:17PM +, Lee Jones wrote: > > Are there any inter-patch dependencies in the set? If so, we should > > know about them so we can coordinate a sensible solution. > Yes, the regulator driver (3/5) that Mark applied is dependent on this > patch...the regulator driver includes include/linux/mfd/bcm590xx.h. There's no actual dependency though - the regulator driver can only be built if the MFD is enabled in Kconfig since it depends on it so until the MFD is present in the tree it won't get built. signature.asc Description: Digital signature
Re: [PATCH 1/2] Tracepoint API doc update: data argument
- Original Message - > From: "Steven Rostedt" > To: "Mathieu Desnoyers" > Cc: linux-kernel@vger.kernel.org, "Ingo Molnar" , "Frederic > Weisbecker" , > "Andrew Morton" > Sent: Tuesday, March 11, 2014 7:34:50 PM > Subject: Re: [PATCH 1/2] Tracepoint API doc update: data argument > > On Mon, 10 Mar 2014 21:04:57 -0400 > Mathieu Desnoyers wrote: > > > Describe the @data argument (probe private data). > > > > Fixes: 38516ab59fbc "tracing: Let tracepoints have data passed to > > tracepoint callbacks" > > CC: Steven Rostedt > > CC: Ingo Molnar > > CC: Frederic Weisbecker > > CC: Andrew Morton > > No signed-off-by. Hi Steven, I'm curious to understand the reason of this "no signed-off-by" on a trivial patch that fixes the missing DocBook comments for one of your previous commits that has been upstream for a few years. What am I missing ? Perhaps you meant this reply for my other documentation update patch (2/2) ? Thanks, Mathieu > > -- Steve > > -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 9/9] powerpc/pm: support deep sleep feature on T1040
On Fri, 2014-03-07 at 12:58 +0800, Chenhui Zhao wrote: > From: Zhao Chenhui > > T1040 supports deep sleep feature, which can switch off most parts of > the SoC when it is in deep sleep mode. This way, it becomes more > energy-efficient. > > The DDR controller will also be powered off in deep sleep. Therefore, > the last stage (the latter part of fsl_dp_enter_low) will run without DDR > access. This piece of code and related TLBs will be prefetched. > > Due to the different initialization code between 32-bit and 64-bit, they > have seperate resume entry and precedure. > > The feature supports 32-bit and 64-bit kernel mode. > > Signed-off-by: Zhao Chenhui > --- > arch/powerpc/include/asm/booke_save_regs.h |3 + > arch/powerpc/kernel/cpu_setup_fsl_booke.S | 17 ++ > arch/powerpc/kernel/head_fsl_booke.S | 30 +++ > arch/powerpc/platforms/85xx/Makefile |2 +- > arch/powerpc/platforms/85xx/deepsleep.c| 201 +++ > arch/powerpc/platforms/85xx/qoriq_pm.c | 38 > arch/powerpc/platforms/85xx/sleep.S| 295 > > arch/powerpc/sysdev/fsl_soc.h |7 + > 8 files changed, 592 insertions(+), 1 deletions(-) > create mode 100644 arch/powerpc/platforms/85xx/deepsleep.c > create mode 100644 arch/powerpc/platforms/85xx/sleep.S > > diff --git a/arch/powerpc/include/asm/booke_save_regs.h > b/arch/powerpc/include/asm/booke_save_regs.h > index 87c357a..37c1f6c 100644 > --- a/arch/powerpc/include/asm/booke_save_regs.h > +++ b/arch/powerpc/include/asm/booke_save_regs.h > @@ -88,6 +88,9 @@ > #define HIBERNATION_FLAG 1 > #define DEEPSLEEP_FLAG 2 > > +#define CPLD_FLAG1 > +#define FPGA_FLAG2 What is this? > #ifndef __ASSEMBLY__ > extern void booke_cpu_state_save(void *buf, int type); > extern void *booke_cpu_state_restore(void *buf, int type); > diff --git a/arch/powerpc/kernel/cpu_setup_fsl_booke.S > b/arch/powerpc/kernel/cpu_setup_fsl_booke.S > index e59d6de..ea9bc28 100644 > --- a/arch/powerpc/kernel/cpu_setup_fsl_booke.S > +++ b/arch/powerpc/kernel/cpu_setup_fsl_booke.S > @@ -318,6 +318,23 @@ flush_backside_L2_cache: > 2: > blr > > +#define CPC_CPCCSR0 0x0 > +#define CPC_CPCCSR0_CPCFL0x800 This is supposed to be CPU setup, not platform setup. > +/* r3 : the base address of CPC */ > +_GLOBAL(fsl_flush_cpc_cache) > + lwz r6, CPC_CPCCSR0(r3) > + ori r6, r6, CPC_CPCCSR0_CPCFL > + stw r6, CPC_CPCCSR0(r3) > + sync > + > + /* Wait until completing the flush */ > +1: lwz r6, CPC_CPCCSR0(r3) > + andi. r6, r6, CPC_CPCCSR0_CPCFL > + bne 1b > + > + blr > + > _GLOBAL(__flush_caches_e500v2) I'm not sure that this belongs here either. > mflr r0 > bl flush_dcache_L1 > diff --git a/arch/powerpc/kernel/head_fsl_booke.S > b/arch/powerpc/kernel/head_fsl_booke.S > index 20204fe..3285752 100644 > --- a/arch/powerpc/kernel/head_fsl_booke.S > +++ b/arch/powerpc/kernel/head_fsl_booke.S > @@ -162,6 +162,19 @@ _ENTRY(__early_start) > #include "fsl_booke_entry_mapping.S" > #undef ENTRY_MAPPING_BOOT_SETUP > > +#if defined(CONFIG_SUSPEND) && defined(CONFIG_FSL_CORENET_RCPM) > + /* if deep_sleep_flag != 0, jump to the deep sleep resume entry */ > + LOAD_REG_ADDR(r4, deep_sleep_flag) > + lwz r3, 0(r4) > + cmpwi r3, 0 > + beq 11f > + /* clear deep_sleep_flag */ > + li r3, 0 > + stw r3, 0(r4) > + b fsl_deepsleep_resume > +11: > +#endif Why do you come in via the normal kernel entry, versus specifying a direct entry point for deep sleep resume? How does U-Boot even know what the normal entry is when resuming? Be careful of the "beq set_ivor" in the CONFIG_RELOCATABLE section above. Also you probably don't want the relocation code to run again when resuming. > +#if defined(CONFIG_SUSPEND) && defined(CONFIG_FSL_CORENET_RCPM) > +_ENTRY(__entry_deep_sleep) > +/* > + * Bootloader will jump to here when resuming from deep sleep. > + * After executing the init code in fsl_booke_entry_mapping.S, > + * will jump to the real resume entry. > + */ > + li r8, 1 > + bl 12f > +12: mflrr9 > + addir9, r9, (deep_sleep_flag - 12b) > + stw r8, 0(r9) > + b __early_start > +deep_sleep_flag: > + .long 0 > +#endif It's a bit ambiguous to say "entry_deep_sleep" when it's resuming rather than entering... So you do have a special entry point. Why do you go to __early_start only to quickly test a flag and branch away? > diff --git a/arch/powerpc/platforms/85xx/Makefile > b/arch/powerpc/platforms/85xx/Makefile > index 7fae817..9a4ea86 100644 > --- a/arch/powerpc/platforms/85xx/Makefile > +++ b/arch/powerpc/platforms/85xx/Makefile > @@ -3,7 +3,7 @@ > # > obj-$(CONFIG_SMP) += smp.o > ifeq ($(CONFIG_FSL_CORENET_RCPM), y) > -obj-$(CONFIG_SUSPEND)+= qoriq_pm.o > +obj-$(CONFIG_SUSPEND)+= qoriq_pm.o
Re: [PATCH 3/9] powerpc/rcpm: add RCPM driver
On Fri, 2014-03-07 at 12:57 +0800, Chenhui Zhao wrote: > diff --git a/arch/powerpc/platforms/85xx/corenet_generic.c > b/arch/powerpc/platforms/85xx/corenet_generic.c > index b756f3d..3fdf9f3 100644 > --- a/arch/powerpc/platforms/85xx/corenet_generic.c > +++ b/arch/powerpc/platforms/85xx/corenet_generic.c > @@ -56,6 +56,8 @@ void __init corenet_gen_setup_arch(void) > > swiotlb_detect_4g(); > > + fsl_rcpm_init(); > + > pr_info("%s board from Freescale Semiconductor\n", ppc_md.name); RCPM is not board-specific. Why is this in board code? > +static void rcpm_v1_cpu_enter_state(int cpu, int state) > +{ > + unsigned int hw_cpu = get_hard_smp_processor_id(cpu); > + unsigned int mask = 1 << hw_cpu; > + > + switch (state) { > + case E500_PM_PH10: > + setbits32(_v1_regs->cdozcr, mask); > + break; > + case E500_PM_PH15: > + setbits32(_v1_regs->cnapcr, mask); > + break; > + default: > + pr_err("Unknown cpu PM state\n"); > + break; > + } > +} Put __func__ in error messages -- and for "unknown value" type messages, print the value. > +static int rcpm_v1_plat_enter_state(int state) > +{ > + u32 *pmcsr_reg = _v1_regs->powmgtcsr; > + int ret = 0; > + int result; > + > + switch (state) { > + case PLAT_PM_SLEEP: > + setbits32(pmcsr_reg, RCPM_POWMGTCSR_SLP); > + > + /* At this point, the device is in sleep mode. */ > + > + /* Upon resume, wait for RCPM_POWMGTCSR_SLP bit to be clear. */ > + result = spin_event_timeout( > + !(in_be32(pmcsr_reg) & RCPM_POWMGTCSR_SLP), 1, 10); > + if (!result) { > + pr_err("%s: timeout waiting for SLP bit to be > cleared\n", > + __func__); Why are you indenting continuation lines with only two spaces (and yet still not aligning with anything)? > + ret = -ETIMEDOUT; > + } > + break; > + default: > + pr_err("Unsupported platform PM state\n"); > + ret = -EINVAL; > + } > + > + return ret; > +} > + > +static void rcpm_v1_freeze_time_base(int freeze) > +{ > + u32 *tben_reg = _v1_regs->ctbenr; > + static u32 mask; > + > + if (freeze) { > + mask = in_be32(tben_reg); > + clrbits32(tben_reg, mask); > + } else { > + setbits32(tben_reg, mask); > + } > + > + /* read back to push the previous write */ > + in_be32(tben_reg); > +} > + > +static void rcpm_v2_freeze_time_base(int freeze) > +{ > + u32 *tben_reg = _v2_regs->pctbenr; > + static u32 mask; > + > + if (freeze) { > + mask = in_be32(tben_reg); > + clrbits32(tben_reg, mask); > + } else { > + setbits32(tben_reg, mask); > + } > + > + /* read back to push the previous write */ > + in_be32(tben_reg); > +} It looks like the only difference between these two functions is how you calculate tben_reg -- factor the rest out into a single function. > +int fsl_rcpm_init(void) > +{ > + struct device_node *np; > + > + np = of_find_compatible_node(NULL, NULL, "fsl,qoriq-rcpm-2.0"); > + if (np) { > + rcpm_v2_regs = of_iomap(np, 0); > + of_node_put(np); > + if (!rcpm_v2_regs) > + return -ENOMEM; > + > + qoriq_pm_ops = _rcpm_v2_ops; > + > + } else { > + np = of_find_compatible_node(NULL, NULL, "fsl,qoriq-rcpm-1.0"); > + if (np) { > + rcpm_v1_regs = of_iomap(np, 0); > + of_node_put(np); > + if (!rcpm_v1_regs) > + return -ENOMEM; > + > + qoriq_pm_ops = _rcpm_v1_ops; > + > + } else { > + pr_err("%s: can't find the rcpm node.\n", __func__); > + return -EINVAL; > + } > + } > + > + return 0; > +} Why isn't this a proper platform driver? -Scott -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Linux 3.4.83
I'm announcing the release of the 3.4.83 kernel. All users of the 3.4 kernel series must upgrade. The updated 3.4.y git tree can be found at: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.4.y and can be browsed at the normal kernel.org git web browser: http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary thanks, greg k-h Makefile |2 arch/arm/include/asm/cacheflush.h |1 arch/arm/mm/proc-v6.S |3 arch/arm/mm/proc-v7.S |2 arch/avr32/Makefile |2 arch/avr32/boards/mimc200/fram.c |1 arch/powerpc/kernel/crash_dump.c |8 arch/powerpc/kvm/emulate.c|2 arch/s390/kvm/kvm-s390.c | 14 - arch/x86/kernel/cpu/perf_event.c |3 arch/x86/xen/enlighten.c |4 arch/x86/xen/smp.c|2 block/blk-exec.c | 12 drivers/acpi/processor_throttling.c | 69 ++--- drivers/acpi/video.c |8 drivers/ata/libata-pmp.c |7 drivers/ata/sata_sil.c|1 drivers/block/nbd.c |8 drivers/block/xen-blkback/blkback.c | 13 drivers/block/xen-blkback/common.h|2 drivers/block/xen-blkback/xenbus.c|2 drivers/connector/cn_proc.c |8 drivers/dma/ste_dma40.c |4 drivers/edac/i7core_edac.c|9 drivers/hwmon/max1668.c |2 drivers/md/dm-mpath.c |7 drivers/media/video/saa7134/saa7134-alsa.c|2 drivers/net/bonding/bond_3ad.c|6 drivers/net/bonding/bond_3ad.h|1 drivers/net/ethernet/broadcom/tg3.c |4 drivers/net/usb/asix.c| 128 +++-- drivers/net/usb/gl620a.c |4 drivers/net/usb/mcs7830.c |5 drivers/net/usb/net1080.c |4 drivers/net/usb/qmi_wwan.c|8 drivers/net/usb/rndis_host.c |4 drivers/net/usb/smsc75xx.c|4 drivers/net/usb/smsc95xx.c|4 drivers/net/usb/usbnet.c | 25 - drivers/net/wireless/iwlwifi/iwl-6000.c |6 drivers/net/wireless/iwlwifi/iwl-agn.c|2 drivers/net/wireless/iwlwifi/iwl-cfg.h|1 drivers/net/wireless/iwlwifi/iwl-core.c |5 drivers/net/wireless/iwlwifi/iwl-debugfs.c|3 drivers/net/wireless/iwlwifi/iwl-pci.c| 10 drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h | 11 drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c | 37 ++ drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c | 65 drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | 27 +- drivers/net/wireless/rtl818x/rtl8187/rtl8187.h| 10 drivers/net/wireless/rtlwifi/base.c | 89 +++--- drivers/net/wireless/rtlwifi/ps.c |2 drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | 18 + drivers/net/wireless/rtlwifi/wifi.h |6 drivers/net/xen-netback/netback.c | 289 +- drivers/staging/line6/pcm.c |5 drivers/usb/serial/ftdi_sio.c |2 drivers/usb/serial/ftdi_sio_ids.h |6 drivers/usb/serial/option.c |3 drivers/xen/events.c | 11 fs/cifs/file.c| 37 ++ fs/cifs/readdir.c |8 fs/cifs/transport.c |7 fs/ext4/ext4.h|2 fs/ext4/extents.c | 25 + fs/ext4/fsync.c |3 fs/ext4/indirect.c|9 fs/ext4/inode.c | 14 - fs/ext4/mmp.c |2 fs/ext4/page-io.c |9 fs/ext4/resize.c | 10 fs/ext4/super.c | 20 - fs/ext4/xattr.c |3 fs/fuse/dir.c |9 fs/fuse/file.c|8 fs/fuse/fuse_i.h |9 fs/fuse/inode.c
Re: [powerpc:next 45/53] warning: (PPC_C2K && ..) selects NOT_COHERENT_CACHE which has unmet direct dependencies (4xx || ..)
On Tue, Mar 11, 2014 at 10:32:29AM -0400, Paul Gortmaker wrote: > On 14-03-11 12:54 AM, Fengguang Wu wrote: > > On Mon, Mar 10, 2014 at 10:49:24AM -0400, Paul Gortmaker wrote: > >> On 14-03-08 03:07 AM, kbuild test robot wrote: > >>> tree: git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git > >>> next > >>> head: c7e64b9ce04aa2e3fad7396d92b5cb92056d16ac > >>> commit: 3c8464a9b12bf83807b6e2c896d7e7b633e1cae7 [45/53] powerpc: Delete > >>> old PrPMC 280/2800 support > >>> config: make ARCH=powerpc c2k_defconfig > >>> > >>> All warnings: > >>> > >>> warning: (PPC_C2K && AMIGAONE) selects NOT_COHERENT_CACHE which has unmet > >>> direct dependencies (4xx || 8xx || E200 || PPC_MPC512x || GAMECUBE_COMMON) > >> > >> This _looks_ like a new warning, but it really is not. If you look > >> at the tree prior to the above named commit, it generates this: > >> > >> $ make c2k_defconfig > >> warning: (PPC_PRPMC2800 && PPC_C2K && AMIGAONE) selects NOT_COHERENT_CACHE > >> which has unmet direct dependencies (4xx || 8xx || E200 || PPC_MPC512x || > >> GAMECUBE_COMMON) > >> warning: (PPC_PRPMC2800 && PPC_C2K && AMIGAONE) selects NOT_COHERENT_CACHE > >> which has unmet direct dependencies (4xx || 8xx || E200 || PPC_MPC512x || > >> GAMECUBE_COMMON) > >> # > >> # configuration written to .config > >> > >> So the warning is slightly different in text, but essentially > >> the exact same thing that was being warned about before. We've > >> just removed one of the possible symbols from existence. > > > > Yes, sorry, the kbuild robot is not smart enough to detect such > > slightly changed error/warnings and will treat them as new ones. > > No apology required. I think we all appreciate the build test > coverage, and I saw your mail where you said you sent out ~60 > reports yesterday- wow! Paul, thank you! But let me clarify it a bit. The kernel test robots typically send out 30+ reports per day, including build/boot error/warnings, performance/power/functional regressions, and build test completion notifications. The ~60 emails I mentioned are the ones that I write up in mutt, most of them are on internal development and maintenance works of the test infrastructure. Thanks, Fengguang > Thanks, > Paul. > -- > > > > >> I'm not sure there would ever be a way to teach kbuild robot > >> about something as subtle as the above; just one of the false > >> positives that we'll have to live with, probably. > > > > It is false positive: "this bug is not introduced by me!" > > > > However if you take a broader view, it's still notifying the possibly > > "relevant" people who may know the background about that bug, or whom > > to further CC the report. :) > > > > Thanks, > > Fengguang > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 6/9] powerpc/85xx: support sleep feature on QorIQ SoCs with RCPM
On Fri, 2014-03-07 at 12:58 +0800, Chenhui Zhao wrote: > In sleep mode, the clocks of e500 cores and unused IP blocks is > turned off. The IP blocks which are allowed to wake up the processor > are still running. > > The sleep mode is equal to the Standby state in Linux. Use the > command to enter sleep mode: > echo standby > /sys/power/state > > Signed-off-by: Chenhui Zhao > --- > arch/powerpc/Kconfig |4 +- > arch/powerpc/platforms/85xx/Makefile |3 + > arch/powerpc/platforms/85xx/qoriq_pm.c | 78 > > 3 files changed, 83 insertions(+), 2 deletions(-) > create mode 100644 arch/powerpc/platforms/85xx/qoriq_pm.c > > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > index 05f6323..e1d6510 100644 > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -222,7 +222,7 @@ config ARCH_HIBERNATION_POSSIBLE > config ARCH_SUSPEND_POSSIBLE > def_bool y > depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx || \ > -(PPC_85xx && !PPC_E500MC) || PPC_86xx || PPC_PSERIES \ > +FSL_SOC_BOOKE || PPC_86xx || PPC_PSERIES \ > || 44x || 40x > > config PPC_DCR_NATIVE > @@ -709,7 +709,7 @@ config FSL_PCI > config FSL_PMC > bool > default y > - depends on SUSPEND && (PPC_85xx || PPC_86xx) > + depends on SUSPEND && (PPC_85xx && !PPC_E500MC || PPC_86xx) Don't mix && and || without parentheses. Maybe convert this into being selected (similar to FSL_RCPM), rather than default y? > diff --git a/arch/powerpc/platforms/85xx/Makefile > b/arch/powerpc/platforms/85xx/Makefile > index 25cebe7..7fae817 100644 > --- a/arch/powerpc/platforms/85xx/Makefile > +++ b/arch/powerpc/platforms/85xx/Makefile > @@ -2,6 +2,9 @@ > # Makefile for the PowerPC 85xx linux kernel. > # > obj-$(CONFIG_SMP) += smp.o > +ifeq ($(CONFIG_FSL_CORENET_RCPM), y) > +obj-$(CONFIG_SUSPEND)+= qoriq_pm.o > +endif There should probably be a kconfig symbol for this. > diff --git a/arch/powerpc/platforms/85xx/qoriq_pm.c > b/arch/powerpc/platforms/85xx/qoriq_pm.c > new file mode 100644 > index 000..915b13b > --- /dev/null > +++ b/arch/powerpc/platforms/85xx/qoriq_pm.c > @@ -0,0 +1,78 @@ > +/* > + * Support Power Management feature > + * > + * Copyright 2014 Freescale Semiconductor Inc. > + * > + * Author: Chenhui Zhao > + * > + * This program is free software; you can redistribute it and/or > modify it > + * under the terms of the GNU General Public License as published by > the > + * Free Software Foundation; either version 2 of the License, or (at your > + * option) any later version. > + */ > + > +#include > +#include > +#include > + > +#include > + > +#define FSL_SLEEP0x1 > +#define FSL_DEEP_SLEEP 0x2 FSL_DEEP_SLEEP is unused. > + > +/* specify the sleep state of the present platform */ > +int sleep_pm_state; > +/* supported sleep modes by the present platform */ > +static unsigned int sleep_modes; Why is one signed and the other unsigned? > + > +static int qoriq_suspend_enter(suspend_state_t state) > +{ > + int ret = 0; > + > + switch (state) { > + case PM_SUSPEND_STANDBY: > + > + if (cur_cpu_spec->cpu_flush_caches) > + cur_cpu_spec->cpu_flush_caches(); > + > + ret = qoriq_pm_ops->plat_enter_state(sleep_pm_state); > + > + break; > + > + default: > + ret = -EINVAL; > + > + } > + > + return ret; > +} > + > +static int qoriq_suspend_valid(suspend_state_t state) > +{ > + if (state == PM_SUSPEND_STANDBY && (sleep_modes & FSL_SLEEP)) > + return 1; > + > + return 0; > +} > + > +static const struct platform_suspend_ops qoriq_suspend_ops = { > + .valid = qoriq_suspend_valid, > + .enter = qoriq_suspend_enter, > +}; > + > +static int __init qoriq_suspend_init(void) > +{ > + struct device_node *np; > + > + sleep_modes = FSL_SLEEP; > + sleep_pm_state = PLAT_PM_SLEEP; > + > + np = of_find_compatible_node(NULL, NULL, "fsl,qoriq-rcpm-2.0"); > + if (np) > + sleep_pm_state = PLAT_PM_LPM20; > + > + suspend_set_ops(_suspend_ops); > + > + return 0; > +} > +arch_initcall(qoriq_suspend_init); Why is this not a platform driver? If fsl_pmc can do it... -Scott -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/3] spi: add xtfpga SPI controller driver
On Wed, Mar 12, 2014 at 04:59:47AM +0400, Max Filippov wrote: > On Wed, Mar 12, 2014 at 4:34 AM, Mark Brown wrote: > > This driver is not actually compatible with the tlv320aic23 driver since > > it needs 8 bit words, you need to at least support that. You don't need > That's strange, because the codec datasheet says the following (section > 3.1.1): > A control word consists of 16 bits, starting with the MSB. The data bits are > latched on the rising edge of SCLK. A rising edge on CS after the 16th rising > clock edge latches the data word into the AIC (see Figure 3-1). > And tlv320aic23 has the following regmap: > const struct regmap_config tlv320aic23_regmap = { > .reg_bits = 7, > .val_bits = 9, Yes, and regmap will format that itself for transmission in 8 bit words so you don't want the SPI controller to also do byte swapping. > and its SPI interface accordingly does the following in .probe: > spi->bits_per_word = 16 > spi->mode = SPI_MODE_0; > ret = spi_setup(spi); That's buggy, drivers should never configure anything more than 8 bits per word with regmap. > > hardware in the controller to support a GPIO chip select, the whole > > point is that the controller chip select isn't wired up and a GPIO is > > used instead. > Actually it's not GPIO. The controller asserts CS line once we set the > start bit while the busy bit is cleared and deasserts it after 16 SCK > pulses. You're missing the point. The controller chip select line can do what it likes, it's not connected to the target device if a GPIO is being used. > > So fix that, but really it's trying to tell you that the hardware is far > > too limited to work with many things. > Ok. It's not designed to work with many things. Should I just move this > driver to the rest of the platform code under arch/xtensa/platform/xtfpga? No, not if you intend to use generic drivers with it. signature.asc Description: Digital signature
Re: [PATCH 3.4 00/99] 3.4.83-stable review
On Sun, Mar 09, 2014 at 05:50:21AM +0900, Satoru Takeuchi wrote: > At Sat, 08 Mar 2014 09:10:00 -0800, > Guenter Roeck wrote: > > > > On 03/08/2014 08:18 AM, Greg Kroah-Hartman wrote: > > > On Sat, Mar 08, 2014 at 06:35:52AM -0800, Guenter Roeck wrote: > > >> On 03/08/2014 01:47 AM, Satoru Takeuchi wrote: > > >>> At Fri, 7 Mar 2014 17:06:56 -0800, > > >>> Greg Kroah-Hartman wrote: > > > > This is the start of the stable review cycle for the 3.4.83 release. > > There are 99 patches in this series, all will be posted as a response > > to this one. If anyone has any issues with these being applied, please > > let me know. > > > > Responses should be made by Mon Mar 10 01:05:53 UTC 2014. > > Anything received after that time might be too late. > > >>> > > >>> This kernel passed my test. > > >>> > > >> > > >> Same here. > > >> > > >> Built results: > > >> total: 119 pass: 97 skipped: 18 fail: 4 > > >> > > >> qemu tests all passed. > > >> > > >> Details are available at http://server.roeck-us.net:8010/builders. > > > > > > Thanks to both of you for testing this, much appreciated. > > > > > > > You are welcome. > > > > Can you possibly add me to the cc: of your introductory e-mail > > announcing new stable releases ? Sometimes it seems to get lost > > and isn't available on any of the 'common' archives (this one > > did not make it to lkml, for example, and many of the individual > > mails didn't make it into the stable mailing list at gmane). > > Me too. You are added as well. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/5] PCI: Don't check resource_size() in pci_bus_alloc_resource()
On Tue, Mar 11, 2014 at 3:02 PM, Bjorn Helgaas wrote: > On Tue, Mar 11, 2014 at 3:39 PM, Yinghai Lu wrote: >> how about replacing that with: >> >> if (avail.start > avail.end) >> continue; >> >> so we do not need to go deep into allocate_resource() > > We could, but why bother? This isn't a performance path, so there's > no need to add more code to optimize it. Adding code means there's > more for human readers to look at and understand, so I prefer not to > add it unless it's needed. oh, i did not look further, if the code path could handle strange constraints properly. like min > max. Thanks Yinghai -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 3.4 00/99] 3.4.83-stable review
On Sat, Mar 08, 2014 at 09:18:57PM -0700, Shuah Khan wrote: > On 03/08/2014 01:50 PM, Satoru Takeuchi wrote: > > At Sat, 08 Mar 2014 09:10:00 -0800, > > Guenter Roeck wrote: > >> > >> On 03/08/2014 08:18 AM, Greg Kroah-Hartman wrote: > >>> On Sat, Mar 08, 2014 at 06:35:52AM -0800, Guenter Roeck wrote: > On 03/08/2014 01:47 AM, Satoru Takeuchi wrote: > > At Fri, 7 Mar 2014 17:06:56 -0800, > > Greg Kroah-Hartman wrote: > >> > >> This is the start of the stable review cycle for the 3.4.83 release. > >> There are 99 patches in this series, all will be posted as a response > >> to this one. If anyone has any issues with these being applied, please > >> let me know. > >> > >> Responses should be made by Mon Mar 10 01:05:53 UTC 2014. > >> Anything received after that time might be too late. > > > > This kernel passed my test. > > > > Same here. > > Built results: > total: 119 pass: 97 skipped: 18 fail: 4 > > qemu tests all passed. > > Details are available at http://server.roeck-us.net:8010/builders. > >>> > >>> Thanks to both of you for testing this, much appreciated. > >>> > >> > >> You are welcome. > >> > >> Can you possibly add me to the cc: of your introductory e-mail > >> announcing new stable releases ? Sometimes it seems to get lost > >> and isn't available on any of the 'common' archives (this one > >> did not make it to lkml, for example, and many of the individual > >> mails didn't make it into the stable mailing list at gmane). > > > > Me too. > > > > Compile tests and boot tests passed on all my test systems. No dmesg > regressions: emerg, crit, alert, err are clean. No regressions in warn. > > I have a similar request for cc. The first message seems to get lost and > messages don't get threaded correctly. Could you please cc me on the of > your introductory e-mail. Sure, now added, and thanks for testing. greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/3] spi: add xtfpga SPI controller driver
On Wed, Mar 12, 2014 at 04:59:47AM +0400, Max Filippov wrote: > And tlv320aic23 has the following regmap: > const struct regmap_config tlv320aic23_regmap = { > .reg_bits = 7, > .val_bits = 9, > and its SPI interface accordingly does the following in .probe: > spi->bits_per_word = 16 > spi->mode = SPI_MODE_0; > ret = spi_setup(spi); So I just looked again - the SPI code isn't in mainline, there must be some out of tree patches here that can't have been tested since the driver was converted to regmap (or the byte swapping you're doing in the controller is buggy for 16 bits per word). signature.asc Description: Digital signature
RE: [PATCH v3 1/2] Staging: comedi: addi-data: Fix long CamelCase function names
On Tuesday, March 11, 2014 3:19 PM, Fred Akers wrote: > This patch fixes a few function names that are very long and are > not in the correct naming style > > Signed-off-by: Fred Akers > --- > .../comedi/drivers/addi-data/hwdrv_apci035.c | 58 +-- > .../comedi/drivers/addi-data/hwdrv_apci1500.c | 106 > +++-- > .../comedi/drivers/addi-data/hwdrv_apci1564.c | 68 ++--- > .../comedi/drivers/addi-data/hwdrv_apci3120.c | 104 ++-- > .../comedi/drivers/addi-data/hwdrv_apci3200.c | 72 +++--- > .../comedi/drivers/addi-data/hwdrv_apci3501.c | 24 ++--- > drivers/staging/comedi/drivers/addi_apci_035.c | 14 +-- > drivers/staging/comedi/drivers/addi_apci_1500.c| 24 ++--- > drivers/staging/comedi/drivers/addi_apci_1564.c| 16 ++-- > drivers/staging/comedi/drivers/addi_apci_3120.c| 26 ++--- > drivers/staging/comedi/drivers/addi_apci_3200.c| 36 +++ > drivers/staging/comedi/drivers/addi_apci_3501.c| 6 +- > 12 files changed, 277 insertions(+), 277 deletions(-) This looks fine but I cannot get this or patch 2/2 to apply... Assuming it applies cleanly to Greg's tree and you compile tested it, for both patches: Reviewed-by: H Hartley Sweeten -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] xz: make XZ_DEC_BCJ filters non-optional
On 05/03/14 16:24, Lasse Collin wrote: On 2014-03-05 Phillip Lougher wrote: (BTW Kyle you should have CC'd me on the patch as a courtesy). I could have done that too but somehow I didn't, sorry. np But speaking as the Squashfs author, the lack of BCJ support for an architecture creates a subtle failure mode in Squashfs, this is because not all blocks in a Squashfs filesystem get compressed with a BCJ filter. At compression time each block is compressed without any BCJ filter, and then with the BCJ filter(s) selected on the command line, and the best compression for *that* block is chosen. What this means is kernels without a particular BCJ filter can still read the Squashfs metadata (mount, ls etc.) and read many of the files, it is only some files that mysteriously fail with decompression error. As such this will be (and has been) invariably treated as a bug in Squashfs. There is an easy way to make Squashfs give an error message in the kernel log. xz_dec_run() gives XZ_OPTIONS_ERROR when valid-looking but unsupported input is detected. Currently Squashfs treats all error codes from xz_dec_run() the same way so the reason for the decompression error is silently lost. Yes, that is deliberate. It's to give a generic easy to understand error message for potentially novice users that may be running Linux from LiveCDs. When I wrote the original zlib support for Squashfs, I put in a lot of debug information in the zlib error messages, e.g. ERROR("zlib_inflate returned unexpected result" " 0x%x, srclength %d, avail_in %d," " avail_out %d\n", zlib_err, srclength, msblk->stream.avail_in, msblk->stream.avail_out); But after mainlining Squashfs in 2009, I started to get increasing complaints that the error messages were too technical (full of hex numbers) and confusing to new users - the kind of people who maybe burn a corrupt liveCD and then get screenfulls of these errors full of different numbers coming up on the screen. They would do a websearch and discover that the errors meant "corrupted disk", and then ask why didn't it just say that, and not give all those numbers. Or worse they'd just silently give up and go back to Windows. So in March 2009 I changed it to the error message ERROR("zlib_inflate error, data probably corrupt\n") With *no* numbers ... and I copied the same approach for xz. In kernel 3.13 (released earlier this year) I went further and pulled out the error message printing from the compression wrappers, and made it a single generic message, because I realised there was no longer any decompressor specific error handling (just the same message in each wrapper). ERROR("%s decompression failed, data probably corrupt\n", msblk->decompressor->name); Putting back separate error messages into each decompressor wrapper, and then putting back different error messages based on the error code return seems like a retrograde step because distros don't like them. Below is an *untested* fix. I'm not sure about the exact wording of the error message, so feel free to improve it. diff -Narup linux-3.14-rc5.orig/fs/squashfs/xz_wrapper.c linux-3.14-rc5/fs/squashfs/xz_wrapper.c --- linux-3.14-rc5.orig/fs/squashfs/xz_wrapper.c2014-03-03 04:56:16.0 +0200 +++ linux-3.14-rc5/fs/squashfs/xz_wrapper.c 2014-03-05 18:08:58.729643127 +0200 @@ -170,8 +170,13 @@ static int squashfs_xz_uncompress(struct squashfs_finish_page(output); - if (xz_err != XZ_STREAM_END || k < b) + if (xz_err != XZ_STREAM_END || k < b) { + if (xz_err == XZ_OPTIONS_ERROR) + ERROR("Unsupported XZ-compressed data; check the XZ " + "options in the kernel config\n"); + goto out; + } return total + stream->buf.out_pos; Moreover, without expert knowledge of Squashfs, and the config options, most people will not have a clue how to fix the issue. This is why I prefer the first option, which is to reinstate the enabling of all filters by default, and then to allow people to remove the filters they don't want. I will submit the first option. In the other email Florian Fainelli seemed to be OK with that too. BTW there is a potential additional fix for Squashfs that will make its handling of (lack of) BCJ filters more intelligent at mount time, but this of course only addresses Squashfs, and it relies on an additional call into XZ being added. The BCJ filters specified at filesystem creation are stored in the compression options part of the superblock, and are known at mount time. Squashfs should check that these filters are supported by the kernel and refuse to mount it otherwise. This has not been done because AFAIK there is no way to query XZ to determine which BCJ filters are supported (beyond
[PATCH v2] perf/x86/uncore: fix compilation warning in snb_uncore_imc_init_box()
This patch fixes a compilation problem (unused variable) with the new SNB/IVB/HSW uncore IMC code. In V2, we simplify the fix as suggested by Peter Zjilstra. Reported-by: Stephen Rothwell Signed-off-by: Stephane Eranian -- diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c index 3e5b240..d614f6b 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c @@ -1722,15 +1722,16 @@ static struct attribute_group snb_uncore_imc_format_group = { static void snb_uncore_imc_init_box(struct intel_uncore_box *box) { struct pci_dev *pdev = box->pci_dev; - u32 addr_lo, addr_hi; + int where = SNB_UNCORE_PCI_IMC_BAR_OFFSET; + u32 pci_dword; resource_size_t addr; - pci_read_config_dword(pdev, SNB_UNCORE_PCI_IMC_BAR_OFFSET, _lo); - addr = addr_lo; + pci_read_config_dword(pdev, where, _dword); + addr = pci_dword; #ifdef CONFIG_PHYS_ADDR_T_64BIT - pci_read_config_dword(pdev, SNB_UNCORE_PCI_IMC_BAR_OFFSET+4, _hi); - addr = ((resource_size_t)addr_hi << 32) | addr_lo; + pci_read_config_dword(pdev, where + 4, _dword); + addr |= ((resource_size_t)pci_dword << 32); #endif addr &= ~(PAGE_SIZE - 1); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v3 2/5] mfd: add bcm590xx pmu driver
On Tue, Mar 11, 2014 at 10:45:17PM +, Lee Jones wrote: > > > > Add a driver for the BCM590xx PMU multi-function devices. The driver > > > > initially supports regmap initialization and instantiation of the > > > > voltage regulator device function of the PMU. > > > > > > > > Signed-off-by: Matt Porter > > > > Reviewed-by: Tim Kryger > > > > Reviewed-by: Markus Mayer > > > > --- > > > > drivers/mfd/Kconfig | 8 > > > > drivers/mfd/Makefile | 1 + > > > > drivers/mfd/bcm590xx.c | 93 > > > > > > > > include/linux/mfd/bcm590xx.h | 31 +++ > > > > 4 files changed, 133 insertions(+) > > > > create mode 100644 drivers/mfd/bcm590xx.c > > > > create mode 100644 include/linux/mfd/bcm590xx.h > > > > > > I have a tiny nit that 'ret' doesn't need to be initialised before > > > use in probe(), but apart from that... > > > > > > Looks pretty sensible: > > > Acked-by: Lee Jones > > > > Ok, thanks. When I get back in front of my desktop I'll send a v4 of > > just this patch to address that nit. Mark already applied the regulator > > driver from this series, will you be taking this through your tree? For > > that matter, I wonder if the binding would also go through your tree > > with this driver. > > At least the MFD portion and the DT binding doc will go through the > MFD tree. > > Are there any inter-patch dependencies in the set? If so, we should > know about them so we can coordinate a sensible solution. Yes, the regulator driver (3/5) that Mark applied is dependent on this patch...the regulator driver includes include/linux/mfd/bcm590xx.h. -Matt -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v4 1/5] mfd: add bcm590xx pmu DT binding
Add a DT binding for the BCM590xx PMUs. The binding inherits from the generic regulator bindings. Signed-off-by: Matt Porter Reviewed-by: Tim Kryger Reviewed-by: Markus Mayer --- Documentation/devicetree/bindings/mfd/bcm590xx.txt | 41 ++ 1 file changed, 41 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/bcm590xx.txt diff --git a/Documentation/devicetree/bindings/mfd/bcm590xx.txt b/Documentation/devicetree/bindings/mfd/bcm590xx.txt new file mode 100644 index 000..2300246 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/bcm590xx.txt @@ -0,0 +1,41 @@ +--- +BCM590xx Power Management Units +--- + +Required properties: +- compatible: "brcm,bcm59056" +- reg: I2C slave address +- interrupts: interrupt for the PMU. Generic interrupt client node bindings + are described in interrupt-controller/interrupts.txt + +-- +Voltage Regulators +-- + +Optional properties: +- regulators: This is the list of child nodes that specify the regulator + initialization data for defined regulators. Generic regulator bindings + are described in regulator/regulator.txt. + + The valid regulator nodes for BCM59056 are: + rfldo, camldo1, camldo2, simldo1, simldo2, sdldo, sdxldo, + mmcldo1, mmcldo2, audldo, micldo, usbldo, vibldo, + csr, iosr1, iosr2, msr, sdsr1, sdsr2, vsr + +Example: + pmu: bcm59056@8 { + compatible = "brcm,bcm59056"; + reg = <0x08>; + interrupts = ; + regulators { + #address-cells = <1>; + #size-cells = <0>; + + rfldo_reg: rfldo { + regulator-min-microvolt = <120>; + regulator-max-microvolt = <330>; + }; + + ... + }; + }; -- 1.8.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v4 2/5] mfd: add bcm590xx pmu driver
Add a driver for the BCM590xx PMU multi-function devices. The driver initially supports regmap initialization and instantiation of the voltage regulator device function of the PMU. Signed-off-by: Matt Porter Reviewed-by: Tim Kryger Reviewed-by: Markus Mayer --- drivers/mfd/Kconfig | 8 drivers/mfd/Makefile | 1 + drivers/mfd/bcm590xx.c | 93 include/linux/mfd/bcm590xx.h | 31 +++ 4 files changed, 133 insertions(+) create mode 100644 drivers/mfd/bcm590xx.c create mode 100644 include/linux/mfd/bcm590xx.h diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 49bb445..27ff37c 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -59,6 +59,14 @@ config MFD_AAT2870_CORE additional drivers must be enabled in order to use the functionality of the device. +config MFD_BCM590XX + tristate "Broadcom BCM590xx PMUs" + select MFD_CORE + select REGMAP_I2C + depends on I2C + help + Support for the BCM590xx PMUs from Broadcom + config MFD_CROS_EC tristate "ChromeOS Embedded Controller" select MFD_CORE diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile index 5aea5ef..4c342bf 100644 --- a/drivers/mfd/Makefile +++ b/drivers/mfd/Makefile @@ -8,6 +8,7 @@ obj-$(CONFIG_MFD_88PM800) += 88pm800.o 88pm80x.o obj-$(CONFIG_MFD_88PM805) += 88pm805.o 88pm80x.o obj-$(CONFIG_MFD_SM501)+= sm501.o obj-$(CONFIG_MFD_ASIC3)+= asic3.o tmio_core.o +obj-$(CONFIG_MFD_BCM590XX) += bcm590xx.o obj-$(CONFIG_MFD_CROS_EC) += cros_ec.o obj-$(CONFIG_MFD_CROS_EC_I2C) += cros_ec_i2c.o obj-$(CONFIG_MFD_CROS_EC_SPI) += cros_ec_spi.o diff --git a/drivers/mfd/bcm590xx.c b/drivers/mfd/bcm590xx.c new file mode 100644 index 000..926a57e --- /dev/null +++ b/drivers/mfd/bcm590xx.c @@ -0,0 +1,93 @@ +/* + * Broadcom BCM590xx PMU + * + * Copyright 2014 Linaro Limited + * Author: Matt Porter + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static const struct mfd_cell bcm590xx_devs[] = { + { + .name = "bcm590xx-vregs", + }, +}; + +static const struct regmap_config bcm590xx_regmap_config = { + .reg_bits = 8, + .val_bits = 8, + .max_register = BCM590XX_MAX_REGISTER, + .cache_type = REGCACHE_RBTREE, +}; + +static int bcm590xx_i2c_probe(struct i2c_client *i2c, + const struct i2c_device_id *id) +{ + struct bcm590xx *bcm590xx; + int ret; + + bcm590xx = devm_kzalloc(>dev, sizeof(*bcm590xx), GFP_KERNEL); + if (!bcm590xx) + return -ENOMEM; + + i2c_set_clientdata(i2c, bcm590xx); + bcm590xx->dev = >dev; + bcm590xx->i2c_client = i2c; + + bcm590xx->regmap = devm_regmap_init_i2c(i2c, _regmap_config); + if (IS_ERR(bcm590xx->regmap)) { + ret = PTR_ERR(bcm590xx->regmap); + dev_err(>dev, "regmap initialization failed: %d\n", ret); + return ret; + } + + ret = mfd_add_devices(>dev, -1, bcm590xx_devs, + ARRAY_SIZE(bcm590xx_devs), NULL, 0, NULL); + if (ret < 0) + dev_err(>dev, "failed to add sub-devices: %d\n", ret); + + return ret; +} + +static const struct of_device_id bcm590xx_of_match[] = { + { .compatible = "brcm,bcm59056" }, + { } +}; +MODULE_DEVICE_TABLE(i2c, bcm590xx_of_match); + +static const struct i2c_device_id bcm590xx_i2c_id[] = { + { "bcm59056" }, + { } +}; +MODULE_DEVICE_TABLE(i2c, bcm590xx_i2c_id); + +static struct i2c_driver bcm590xx_i2c_driver = { + .driver = { + .name = "bcm590xx", + .owner = THIS_MODULE, + .of_match_table = of_match_ptr(bcm590xx_of_match), + }, + .probe = bcm590xx_i2c_probe, + .id_table = bcm590xx_i2c_id, +}; +module_i2c_driver(bcm590xx_i2c_driver); + +MODULE_AUTHOR("Matt Porter "); +MODULE_DESCRIPTION("BCM590xx multi-function driver"); +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:bcm590xx"); diff --git a/include/linux/mfd/bcm590xx.h b/include/linux/mfd/bcm590xx.h new file mode 100644 index 000..434df2d --- /dev/null +++ b/include/linux/mfd/bcm590xx.h @@ -0,0 +1,31 @@ +/* + * Broadcom BCM590xx PMU + * + * Copyright 2014 Linaro Limited + * Author: Matt Porter + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + *
[PATCH v4 5/5] ARM: dts: add bcm590xx pmu support and enable for bcm28155-ap
Add a dtsi to support the BCM590xx PMUs used by the BCM281xx family of SoCs. Enable regulators for use with the dwc2 and sdhci on bcm28155-ap. Signed-off-by: Tim Kryger Signed-off-by: Matt Porter Reviewed-by: Markus Mayer --- arch/arm/boot/dts/bcm28155-ap.dts | 47 +++- arch/arm/boot/dts/bcm59056.dtsi | 77 +++ 2 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/bcm59056.dtsi diff --git a/arch/arm/boot/dts/bcm28155-ap.dts b/arch/arm/boot/dts/bcm28155-ap.dts index 5ff2382..99ff0c1 100644 --- a/arch/arm/boot/dts/bcm28155-ap.dts +++ b/arch/arm/boot/dts/bcm28155-ap.dts @@ -46,7 +46,11 @@ i2c@3500d000 { status="okay"; - clock-frequency = <40>; + clock-frequency = <10>; + + pmu: pmu@8 { + reg = <0x08>; + }; }; sdio1: sdio@3f18 { @@ -57,16 +61,22 @@ sdio2: sdio@3f19 { non-removable; max-frequency = <4800>; + vmmc-supply = <_reg>; + vqmmc-supply = <_reg>; status = "okay"; }; sdio4: sdio@3f1b { max-frequency = <4800>; cd-gpios = < 14 GPIO_ACTIVE_LOW>; + vmmc-supply = <_reg>; + vqmmc-supply = <_reg>; status = "okay"; }; usbotg: usb@3f12 { + vusb_d-supply = <_reg>; + vusb_a-supply = <_reg>; status = "okay"; }; @@ -74,3 +84,38 @@ status = "okay"; }; }; + +#include "bcm59056.dtsi" + + { + compatible = "brcm,bcm59056"; + interrupts = ; + regulators { + camldo1_reg: camldo1 { + regulator-min-microvolt = <330>; + regulator-max-microvolt = <330>; + }; + + sdldo_reg: sdldo { + regulator-min-microvolt = <300>; + regulator-max-microvolt = <300>; + }; + + sdxldo_reg: sdxldo { + regulator-min-microvolt = <270>; + regulator-max-microvolt = <330>; + }; + + usbldo_reg: usbldo { + regulator-min-microvolt = <330>; + regulator-max-microvolt = <330>; + regulator-always-on; + }; + + iosr1_reg: iosr1 { + regulator-min-microvolt = <180>; + regulator-max-microvolt = <180>; + regulator-always-on; + }; + }; +}; diff --git a/arch/arm/boot/dts/bcm59056.dtsi b/arch/arm/boot/dts/bcm59056.dtsi new file mode 100644 index 000..0fa1577 --- /dev/null +++ b/arch/arm/boot/dts/bcm59056.dtsi @@ -0,0 +1,77 @@ +/* +* Copyright 2014 Linaro Limited +* Author: Matt Porter +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at your +* option) any later version. +*/ + + { + compatible = "brcm,bcm59056"; + regulators { + #address-cells = <1>; + #size-cells = <0>; + + rfldo_reg: rfldo { + }; + + camldo1_reg: camldo1 { + }; + + camldo2_reg: camldo2 { + }; + + simldo1_reg: simldo1 { + }; + + simldo2_reg: simldo2 { + }; + + sdldo_reg: sdldo { + }; + + sdxldo_reg: sdxldo { + }; + + mmcldo1_reg: mmcldo1 { + }; + + mmcldo2_reg: mmcldo2 { + }; + + audldo_reg: audldo { + }; + + micldo_reg: micldo { + }; + + usbldo_reg: usbldo { + }; + + vibldo_reg: vibldo { + }; + + csr_reg: csr { + }; + + iosr1_reg: iosr1 { + }; + + iosr2_reg: iosr2 { + }; + + msr_reg: msr { + }; + + sdsr1_reg: sdsr1 { + }; + + sdsr2_reg: sdsr2 { + }; + + vsr_reg: vsr { + }; + }; +}; -- 1.8.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/2] Tracepoint API doc update: data argument
On Wed, 12 Mar 2014 00:52:33 + (UTC) Mathieu Desnoyers wrote: > - Original Message - > > From: "Steven Rostedt" > > To: "Mathieu Desnoyers" > > Cc: linux-kernel@vger.kernel.org, "Ingo Molnar" , > > "Frederic Weisbecker" , > > "Andrew Morton" > > Sent: Tuesday, March 11, 2014 7:34:50 PM > > Subject: Re: [PATCH 1/2] Tracepoint API doc update: data argument > > > > On Mon, 10 Mar 2014 21:04:57 -0400 > > Mathieu Desnoyers wrote: > > > > > Describe the @data argument (probe private data). > > > > > > Fixes: 38516ab59fbc "tracing: Let tracepoints have data passed to > > > tracepoint callbacks" > > > CC: Steven Rostedt > > > CC: Ingo Molnar > > > CC: Frederic Weisbecker > > > CC: Andrew Morton > > > > No signed-off-by. > > Hi Steven, > > I'm curious to understand the reason of this "no signed-off-by" on a trivial > patch that fixes the missing DocBook comments for one of your previous > commits that has been upstream for a few years. What am I missing ? > Perhaps you meant this reply for my other documentation update patch (2/2) ? > I mean, my scripts wont accept a patch that the author never added their signed-off-by to. In other words, resubmit, and add your own signed-off-by that happens to be missing from this patch. -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v4 4/5] ARM: configs: bcm_defconfig: enable bcm590xx regulator support
Enable BCM590xx MFD and regulator drivers to manage voltage regulators on BCM281xx platforms. Signed-off-by: Tim Kryger Signed-off-by: Matt Porter Reviewed-by: Markus Mayer --- arch/arm/configs/bcm_defconfig | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/configs/bcm_defconfig b/arch/arm/configs/bcm_defconfig index 2519d6d..0100464 100644 --- a/arch/arm/configs/bcm_defconfig +++ b/arch/arm/configs/bcm_defconfig @@ -79,6 +79,13 @@ CONFIG_HW_RANDOM=y CONFIG_I2C=y CONFIG_I2C_CHARDEV=y # CONFIG_HWMON is not set +CONFIG_MFD_BCM590XX=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_VIRTUAL_CONSUMER=y +CONFIG_REGULATOR_USERSPACE_CONSUMER=y +CONFIG_REGULATOR_BCM590XX=y + CONFIG_VIDEO_OUTPUT_CONTROL=y CONFIG_FB=y CONFIG_BACKLIGHT_LCD_SUPPORT=y -- 1.8.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v5 0/7] arm64: Add ftrace support
Hi, On 03/11/2014 11:35 PM, Will Deacon wrote: Hi Akashi, On Fri, Feb 28, 2014 at 05:18:37AM +, AKASHI Takahiro wrote: This patchset implements a function tracer on arm64. There was another implementation from Cavium network, but both of us agreed to use my patchset as future base. He is supposed to review this code, too. The only issue that I had some concern on was "fault protection" code in prepare_ftrace_return(). With discussions with Steven and Tim (as author of arm ftrace), I removed that code since I'm not quite sure about possibility of "fault" occurrences in this function. The code is tested on ARMv8 Fast Model with the following tracers & events: function tracer with dynamic ftrace function graph tracer with dynamic ftrace syscall tracepoint irqsoff & preemptirqsoff (which use CALLER_ADDRx) and also verified with in-kernel tests, FTRACE_SELFTEST, FTRACE_STARTUP_TEST and EVENT_TRACE_TEST_SYSCALLS. Prerequisites are: * "arm64: Add regs_return_value() in syscall.h" * "arm64: make a single hook to syscall_trace() for all syscall features" patch It looks like there might be some more dependencies that that. Do you have a branch anywhere containing this series, along with all the dependencies so I can have a play? I think you saw the following messages: > HOSTCC scripts/recordmcount > /.../linux-aarch64/scripts/recordmcount.c: In function 'do_file': > /.../linux-aarch64/scripts/recordmcount.c:350:7: error: > 'EM_AARCH64' undeclared (first use in this function) > /.../linux-aarch64/scripts/recordmcount.c:350:7: note: > each undeclared identifier is reported only once for each function it appears in > /.../linux-aarch64/scripts/recordmcount.c:351:15: error: > 'R_AARCH64_ABS64' undeclared (first > use in this function) > make[2]: *** [scripts/recordmcount] Error 1 > make[1]: *** [scripts] Error 2 > make: *** [sub-make] Error 2 This happens when a header file, elf.h, on "your host machine" does not have definitions of EM_AARCH64 nor R_AARCH64_ABS64 because "recordmcount" is a binary utility on host(x86), not target. It is very likely for most distros. (I mentioned this in the cover letter, but the description might not be clear.) Possible solutions are: 1) Define both macros directly in scripts/recordmcount.c 2) Use perl version of recordmcount Currently I take 1), but it is a workaround. 2) should work with my current patch, too. But you need to remove HAVE_C_RECORDCOUNT from arm64/Kconfig. Which one do you prefer? I will include a fix for 1) in the next revision, anyway. Thanks, -Takahiro AKASHI Cheers, Will -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: linux-next: manual merge of the staging tree with the tree
On Wed, Mar 12, 2014 at 01:27:01AM +, Mark Brown wrote: > Hi Greg, You should look at the Subject: you are generating, I think something is missing :) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v4 3/5] regulator: add bcm590xx regulator driver
Add a regulator driver for the BCM590xx PMU voltage regulators. The driver supports LDOs and DCDCs in normal mode only. There is no support for low-power mode or power sequencing. Signed-off-by: Matt Porter Reviewed-by: Tim Kryger Reviewed-by: Markus Mayer --- drivers/regulator/Kconfig | 8 + drivers/regulator/Makefile | 1 + drivers/regulator/bcm590xx-regulator.c | 413 + 3 files changed, 422 insertions(+) create mode 100644 drivers/regulator/bcm590xx-regulator.c diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 6a79328..1169a42 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -139,6 +139,14 @@ config REGULATOR_AS3722 AS3722 PMIC. This will enable support for all the software controllable DCDC/LDO regulators. +config REGULATOR_BCM590XX + tristate "Broadcom BCM590xx PMU Regulators" + depends on MFD_BCM590XX + help + This driver provides support for the voltage regulators on the + BCM590xx PMUs. This will enable support for the software + controllable LDO/Switching regulators. + config REGULATOR_DA903X tristate "Dialog Semiconductor DA9030/DA9034 regulators" depends on PMIC_DA903X diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile index 979f9dd..e1ab514 100644 --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile @@ -20,6 +20,7 @@ obj-$(CONFIG_REGULATOR_ANATOP) += anatop-regulator.o obj-$(CONFIG_REGULATOR_ARIZONA) += arizona-micsupp.o arizona-ldo1.o obj-$(CONFIG_REGULATOR_AS3711) += as3711-regulator.o obj-$(CONFIG_REGULATOR_AS3722) += as3722-regulator.o +obj-$(CONFIG_REGULATOR_BCM590XX) += bcm590xx-regulator.o obj-$(CONFIG_REGULATOR_DA903X) += da903x.o obj-$(CONFIG_REGULATOR_DA9052) += da9052-regulator.o obj-$(CONFIG_REGULATOR_DA9055) += da9055-regulator.o diff --git a/drivers/regulator/bcm590xx-regulator.c b/drivers/regulator/bcm590xx-regulator.c new file mode 100644 index 000..e6b2e8e --- /dev/null +++ b/drivers/regulator/bcm590xx-regulator.c @@ -0,0 +1,413 @@ +/* + * Broadcom BCM590xx regulator driver + * + * Copyright 2014 Linaro Limited + * Author: Matt Porter + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* Register defs */ +#define BCM590XX_RFLDOPMCTRL1 0x60 +#define BCM590XX_IOSR1PMCTRL1 0x7a +#define BCM590XX_IOSR2PMCTRL1 0x7c +#define BCM590XX_CSRPMCTRL10x7e +#define BCM590XX_SDSR1PMCTRL1 0x82 +#define BCM590XX_SDSR2PMCTRL1 0x86 +#define BCM590XX_MSRPMCTRL10x8a +#define BCM590XX_VSRPMCTRL10x8e +#define BCM590XX_REG_ENABLEBIT(7) + +#define BCM590XX_RFLDOCTRL 0x96 +#define BCM590XX_CSRVOUT1 0xc0 +#define BCM590XX_LDO_VSEL_MASK GENMASK(5, 3) +#define BCM590XX_SR_VSEL_MASK GENMASK(5, 0) + +/* LDO regulator IDs */ +#define BCM590XX_REG_RFLDO 0 +#define BCM590XX_REG_CAMLDO1 1 +#define BCM590XX_REG_CAMLDO2 2 +#define BCM590XX_REG_SIMLDO1 3 +#define BCM590XX_REG_SIMLDO2 4 +#define BCM590XX_REG_SDLDO 5 +#define BCM590XX_REG_SDXLDO6 +#define BCM590XX_REG_MMCLDO1 7 +#define BCM590XX_REG_MMCLDO2 8 +#define BCM590XX_REG_AUDLDO9 +#define BCM590XX_REG_MICLDO10 +#define BCM590XX_REG_USBLDO11 +#define BCM590XX_REG_VIBLDO12 + +/* DCDC regulator IDs */ +#define BCM590XX_REG_CSR 13 +#define BCM590XX_REG_IOSR1 14 +#define BCM590XX_REG_IOSR2 15 +#define BCM590XX_REG_MSR 16 +#define BCM590XX_REG_SDSR1 17 +#define BCM590XX_REG_SDSR2 18 +#define BCM590XX_REG_VSR 19 + +#define BCM590XX_NUM_REGS 20 + +#define BCM590XX_REG_IS_LDO(n) (n < BCM590XX_REG_CSR) + +struct bcm590xx_board { + struct regulator_init_data *bcm590xx_pmu_init_data[BCM590XX_NUM_REGS]; +}; + +/* LDO group A: supported voltages in microvolts */ +static const unsigned int ldo_a_table[] = { + 120, 180, 250, 270, 280, + 290, 300, 330, +}; + +/* LDO group C: supported voltages in microvolts */ +static const unsigned int ldo_c_table[] = { + 310, 180, 250, 270, 280, + 290, 300, 330, +}; + +/* DCDC group CSR: supported voltages in microvolts */ +static const struct regulator_linear_range dcdc_csr_ranges[] = { + REGULATOR_LINEAR_RANGE(86, 2, 50, 1), + REGULATOR_LINEAR_RANGE(136, 51, 55, 2), + REGULATOR_LINEAR_RANGE(90, 56, 63, 0), +}; + +/* DCDC group IOSR1: supported voltages in microvolts */ +static const struct regulator_linear_range dcdc_iosr1_ranges[] = { + REGULATOR_LINEAR_RANGE(86, 2, 51, 1), + REGULATOR_LINEAR_RANGE(150,
Re: [PATCH 1/2] Tracepoint API doc update: data argument
On Mon, 10 Mar 2014 21:04:57 -0400 Mathieu Desnoyers wrote: > Describe the @data argument (probe private data). > > Fixes: 38516ab59fbc "tracing: Let tracepoints have data passed to tracepoint > callbacks" > CC: Steven Rostedt > CC: Ingo Molnar > CC: Frederic Weisbecker > CC: Andrew Morton No signed-off-by. -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[patch 7/8] memcg: do not replicate get_mem_cgroup_from_mm in __mem_cgroup_try_charge
From: Michal Hocko __mem_cgroup_try_charge duplicates get_mem_cgroup_from_mm for charges which came without a memcg. The only reason seems to be a tiny optimization when css_tryget is not called if the charge can be consumed from the stock. Nevertheless css_tryget is very cheap since it has been reworked to use per-cpu counting so this optimization doesn't give us anything these days. So let's drop the code duplication so that the code is more readable. Signed-off-by: Michal Hocko Signed-off-by: Johannes Weiner --- mm/memcontrol.c | 50 ++ 1 file changed, 6 insertions(+), 44 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index cc7f3ca3ef34..4f7192bfa5fa 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -2731,52 +2731,14 @@ static int __mem_cgroup_try_charge(struct mm_struct *mm, again: if (*ptr) { /* css should be a valid one */ memcg = *ptr; - if (mem_cgroup_is_root(memcg)) - goto done; - if (consume_stock(memcg, nr_pages)) - goto done; css_get(>css); } else { - struct task_struct *p; - - rcu_read_lock(); - p = rcu_dereference(mm->owner); - /* -* Because we don't have task_lock(), "p" can exit. -* In that case, "memcg" can point to root or p can be NULL with -* race with swapoff. Then, we have small risk of mis-accouning. -* But such kind of mis-account by race always happens because -* we don't have cgroup_mutex(). It's overkill and we allo that -* small race, here. -* (*) swapoff at el will charge against mm-struct not against -* task-struct. So, mm->owner can be NULL. -*/ - memcg = mem_cgroup_from_task(p); - if (!memcg) - memcg = root_mem_cgroup; - if (mem_cgroup_is_root(memcg)) { - rcu_read_unlock(); - goto done; - } - if (consume_stock(memcg, nr_pages)) { - /* -* It seems dagerous to access memcg without css_get(). -* But considering how consume_stok works, it's not -* necessary. If consume_stock success, some charges -* from this memcg are cached on this cpu. So, we -* don't need to call css_get()/css_tryget() before -* calling consume_stock(). -*/ - rcu_read_unlock(); - goto done; - } - /* after here, we may be blocked. we need to get refcnt */ - if (!css_tryget(>css)) { - rcu_read_unlock(); - goto again; - } - rcu_read_unlock(); + memcg = get_mem_cgroup_from_mm(mm); } + if (mem_cgroup_is_root(memcg)) + goto done; + if (consume_stock(memcg, nr_pages)) + goto done; do { bool invoke_oom = oom && !nr_oom_retries; @@ -2812,8 +2774,8 @@ again: if (batch > nr_pages) refill_stock(memcg, batch - nr_pages); - css_put(>css); done: + css_put(>css); *ptr = memcg; return 0; nomem: -- 1.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
linux-next: manual merge of the staging tree with the tree
Hi Greg, Today's linux-next merge of the staging tree got a conflict in arch/arm/boot/dts/imx53-qsb.dts between various commits from the arm-soc tree and commit 17b5001b5143e3b ("imx-drm: convert to componentised device support") from the staging tree. I fixed it up (see below) and can carry the fix as necessary (no action is required). diff --cc arch/arm/boot/dts/imx53-qsb.dts index dec4b073ceb1,8b254289344f.. --- a/arch/arm/boot/dts/imx53-qsb.dts +++ b/arch/arm/boot/dts/imx53-qsb.dts diff --git a/arch/arm/boot/dts/imx53-qsb-common.dtsi b/arch/arm/boot/dts/imx53-qsb-common.dtsi index 2dca98b79f48..50823d0f05bf 100644 --- a/arch/arm/boot/dts/imx53-qsb-common.dtsi +++ b/arch/arm/boot/dts/imx53-qsb-common.dtsi @@ -17,7 +17,7 @@ reg = <0x7000 0x4000>; }; - display@di0 { + display0: display@di0 { compatible = "fsl,imx-parallel-display"; crtcs = < 0>; interface-pix-fmt = "rgb565"; @@ -68,6 +68,12 @@ }; }; + imx-drm { + compatible = "fsl,imx-drm"; + crtcs = < 0>; + connectors = <>; + }; + leds { compatible = "gpio-leds"; pinctrl-names = "default"; pgpRg89BNt8nz.pgp Description: PGP signature
[patch 5/8] memcg: remove unnecessary !mm check from try_get_mem_cgroup_from_mm()
Users pass either a mm that has been established under task lock, or use a verified current->mm, which means the task can't be exiting. Signed-off-by: Johannes Weiner Acked-by: Michal Hocko --- mm/memcontrol.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index c40186cf22ad..1780e66ec61e 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -1075,13 +1075,6 @@ struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm) { struct mem_cgroup *memcg = NULL; - if (!mm) - return NULL; - /* -* Because we have no locks, mm->owner's may be being moved to other -* cgroup. We use css_tryget() here even if this looks -* pessimistic (rather than adding locks here). -*/ rcu_read_lock(); do { memcg = mem_cgroup_from_task(rcu_dereference(mm->owner)); -- 1.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[patch 4/8] mm: memcg: push !mm handling out to page cache charge function
Only page cache charges can happen without an mm context, so push this special case out of the inner core and into the cache charge function. An ancient comment explains that the mm can also be NULL in case the task is currently being migrated, but that is not actually true with the current case, so just remove it. Signed-off-by: Johannes Weiner --- mm/memcontrol.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index cfdb9c385d8d..c40186cf22ad 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -2737,15 +2737,6 @@ static int __mem_cgroup_try_charge(struct mm_struct *mm, if (gfp_mask & __GFP_NOFAIL) oom = false; - - /* -* We always charge the cgroup the mm_struct belongs to. -* The mm_struct's mem_cgroup changes on task migration if the -* thread group leader migrates. It's possible that mm is not -* set, if so charge the root memcg (happens for pagecache usage). -*/ - if (!*ptr && !mm) - *ptr = root_mem_cgroup; again: if (*ptr) { /* css should be a valid one */ memcg = *ptr; @@ -4070,6 +4061,12 @@ int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm, return 0; if (!PageSwapCache(page)) { + /* +* Page cache insertions can happen without an actual +* task context, e.g. during disk probing on boot. +*/ + if (!mm) + memcg = root_mem_cgroup; ret = __mem_cgroup_try_charge(mm, gfp_mask, 1, , true); if (ret != -ENOMEM) __mem_cgroup_commit_charge(memcg, page, 1, type, false); -- 1.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v4 0/5] BCM59056 PMU regulator support
The BCM59056 is a multi-function power management unit used with the BCM281xx family of SoCs. This series adds an MFD and voltage regulator driver to support the BCM59056. The bcm28155-ap DT support is updated to enable use of regulators on the otg and sdhci peripherals. Changes since v3: - remove needless init of local ret variable in mfd driver probe Changes since v2: - Move to mfd_add_devices() approach, eliminating representation of the regulator block as a hardware subdevice. Regulators are listed in the PMU binding and referenced via the parent device of_node by the regulator driver. - Allow mfd driver to build as module - Remove regulator constraints from the .dtsi include only the board-specific constraints in the board .dts. Changes since v1: - renamed to bcm590xx to accomodate future family parts - remove use of subsys_initcall - fix BCM590XX_MAX_REGISTER value - remove unused chip id in mfd of/i2c matching - switch to of_platform_populate() in mfd - update binding to single document with regulators as optional properties in the regulator subdevice IP description - remove unused regulator get/set mode ops - remove unneeded regulator NULL constraint check - regulators property is optional, allow the driver to probe when it is missing - move of_node presence check into bcm590xx_parse_dt_reg_data() Matt Porter (5): mfd: add bcm590xx pmu DT binding mfd: add bcm590xx pmu driver regulator: add bcm590xx regulator driver ARM: configs: bcm_defconfig: enable bcm590xx regulator support ARM: dts: add bcm590xx pmu support and enable for bcm28155-ap Documentation/devicetree/bindings/mfd/bcm590xx.txt | 41 ++ arch/arm/boot/dts/bcm28155-ap.dts | 47 ++- arch/arm/boot/dts/bcm59056.dtsi| 77 arch/arm/configs/bcm_defconfig | 7 + drivers/mfd/Kconfig| 8 + drivers/mfd/Makefile | 1 + drivers/mfd/bcm590xx.c | 93 + drivers/regulator/Kconfig | 8 + drivers/regulator/Makefile | 1 + drivers/regulator/bcm590xx-regulator.c | 413 + include/linux/mfd/bcm590xx.h | 31 ++ 11 files changed, 726 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/mfd/bcm590xx.txt create mode 100644 arch/arm/boot/dts/bcm59056.dtsi create mode 100644 drivers/mfd/bcm590xx.c create mode 100644 drivers/regulator/bcm590xx-regulator.c create mode 100644 include/linux/mfd/bcm590xx.h -- 1.8.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/