Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1650660 > unrolled thread

Re: [PATCH 6/7] RISC-V: arch/riscv/kernel

Started byPavel Machek <pavel@ucw.cz>
First post2017-05-25 19:10 +0200
Last post2017-06-03 05:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 6/7] RISC-V: arch/riscv/kernel Pavel Machek <pavel@ucw.cz> - 2017-05-25 19:10 +0200
    Re: [PATCH 6/7] RISC-V: arch/riscv/kernel Palmer Dabbelt <palmer@dabbelt.com> - 2017-06-03 05:40 +0200

#1650660 — Re: [PATCH 6/7] RISC-V: arch/riscv/kernel

FromPavel Machek <pavel@ucw.cz>
Date2017-05-25 19:10 +0200
SubjectRe: [PATCH 6/7] RISC-V: arch/riscv/kernel
Message-ID<tL4qR-2vP-5@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Hi!

> +static void ci_leaf_init(struct cacheinfo *this_leaf,
> +                         struct device_node *node,
> +                         enum cache_type type, unsigned int level)
> +{
> +        this_leaf->of_node = node;
> +        this_leaf->level = level;
> +        this_leaf->type = type;
> +        this_leaf->physical_line_partition = 1; // not a sector cache
> +        this_leaf->attributes = CACHE_WRITE_BACK | CACHE_READ_ALLOCATE | CACHE_WRITE_ALLOCATE; // TODO: add to DTS
> +}

You may want to run the patches through checkpatch. (Comment style,
long lines).

> +static int __populate_cache_leaves(unsigned int cpu)
> +{
> +	struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(cpu);
> +	struct cacheinfo *this_leaf = this_cpu_ci->info_list;
> +	struct device_node *np = of_cpu_device_node_get(cpu);
> +	int levels = 1, level = 1;
> +
> +	if (of_property_read_bool(np, "cache-size"))   ci_leaf_init(this_leaf++, np, CACHE_TYPE_UNIFIED, level);
> +	if (of_property_read_bool(np, "i-cache-size")) ci_leaf_init(this_leaf++, np, CACHE_TYPE_INST, level);
> +	if (of_property_read_bool(np, "d-cache-size")) ci_leaf_init(this_leaf++, np, CACHE_TYPE_DATA, level);


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[toc] | [next] | [standalone]


#1656697

FromPalmer Dabbelt <palmer@dabbelt.com>
Date2017-06-03 05:40 +0200
Message-ID<tO84W-1J3-3@gated-at.bofh.it>
In reply to#1650660
On Thu, 25 May 2017 10:05:05 PDT (-0700), pavel@ucw.cz wrote:
>> +static void ci_leaf_init(struct cacheinfo *this_leaf,
>> +                         struct device_node *node,
>> +                         enum cache_type type, unsigned int level)
>> +{
>> +        this_leaf->of_node = node;
>> +        this_leaf->level = level;
>> +        this_leaf->type = type;
>> +        this_leaf->physical_line_partition = 1; // not a sector cache
>> +        this_leaf->attributes = CACHE_WRITE_BACK | CACHE_READ_ALLOCATE | CACHE_WRITE_ALLOCATE; // TODO: add to DTS
>> +}
>
> You may want to run the patches through checkpatch. (Comment style,
> long lines).

Thanks.  Someone else suggested this and I've fixed most of the errors.  I'll
submit a v2 with everyone's feedback once I get through my mail.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web