Re: [linux-yocto] how to add recipe-sysroot-native to PKG_CONFIG_PATH for linux-yocto
Hi Alex, thank you so much for your quick reply. In fact, I just modified the linux-yocto_5.0.bb file directly: ~/code/poky_new/poky$ git diff meta/recipes-kernel/linux/linux-yocto_5.0.bb Diff --git a/meta/recipes-kernel/linux/linux-yocto_5.0.bb b/meta/recipes-kernel/linux/linux-yocto_5.0.bb Index ae8f643e9f04..64180919227d 100644 --- a/meta/recipes-kernel/linux/linux-yocto_5.0.bb +++ b/meta/recipes-kernel/linux/linux-yocto_5.0.bb @@ -31,7 +31,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" LINUX_VERSION ?= "5.0.7" DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" -DEPENDS += "openssl-native util-linux-native" +DEPENDS += "openssl-native util-linux-native pkgconfig-native glib-2.0-native zlib-native" PV = "${LINUX_VERSION}+git${SRCPV}" Related dependencies, such as pkgconfig, glib-2.0 and zlib, have been added above, since kallsyms was built during kernel compilation, I think they should are all build-time native dependencies. The key point now is that the PKG_CONFIG_PATH variable contains the relevant directory for the recipe-sysroot, but the required glib-2.0.pc file is placed naturally under the recipe-sysroot-native subdirectory. So I need to find a way to add the recipe-sysroot-native subdirectory to PKG_CONFIG_PATH, so that pkg-config tool can find the glib-2.0.pc file. Alexander Kanavin 于2019年5月14日周二 下午6:12写道: > You probably need to add a dependency on glib-2.0 to your recipe, then > the needed pkgconfig will be in the target sysroot. > > If you can copy-paste the entire recipe, that would help. > > Alex > > On Tue, 14 May 2019 at 11:06, Tong Chen wrote: > > > > Hi all: > > I'm adding some kernel extensions to poky. In summary, I need to extend > kallsyms, and the new functionality depends on glib-2.0. > > So I added pkg-confi in the ./scripts/Makefile: > > > > HOSTCFLAGS_kallsyms.o := $(shell pkg-config --cflags glib-2.0) > -I$(srctree)/scripts > > HOSTLDLIBS_kallsyms := $(shell pkg-config --libs glib-2.0) -ldw > > > > But when compiling with bitbake, the following error occurs: > > > > | Package glib-2.0 was not found in the pkg-config search path. > > | Perhaps you should add the directory containing `glib-2.0.pc' > > | to the PKG_CONFIG_PATH environment variable > > | No package 'glib-2.0' found > > > > Extrat the setting of PKG_CONFIG_PATH from temp/run.do_compile: > > > > Export > PKG_CONFIG_PATH="/home/hchan/code/poky_new/poky/build_ctd/tmp/work/qemux86_64-poky-linux/linux-yocto/5.0.7+gitAUTOINC+d26eec23cf_891531d68e-r0/recipe-sysroot/usr/lib/pkgconfig > :/home/hchan/code/poky_new/poky/build_ctd/tmp/work/qemux86_64-poky-linux/linux-yocto/5.0.7+gitAUTOINC+d26eec23cf_891531d68e-r0/recipe-sysroot/usr/share/pkgconfig" > > > > Look at the recipe-sysroot directory, where there is no corresponding > glib-2.0.pc file, but in the recipe-sysroot-native directory, there is: > > > > ./recipe-sysroot-native/usr/lib/pkgconfig/glib-2.0.pc > > > > So my question is how to insert recipe-sysroot-native directory to > PKG_CONFIG_PATH variable? > > > > I am not particularly familiar with poky/bitbake at the moment. By > searching, I found these assignments. But not sure where to add it, and how > to add: > > > > Hchan@hchan-ThinkPad:~/code/poky_new/poky$ grep --color -rnH 'export > PKG_CONFIG_PATH=' ./meta* > > ./meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-native.in:3:export > PKG_CONFIG_PATH="@PATH_NATIVE@" > > ./meta/recipes-devtools/qemu/qemu.inc:85: export > PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH > > ./meta/classes/toolchain-scripts.bbclass:49: echo 'export > PKG_CONFIG_PATH=$SDKTARGETSYSROOT'"$libdir"'/pkgconfig:$SDKTARGETSYSROOT'"$prefix"'/share/pkgconfig' > >> $script > > ./meta/classes/toolchain-scripts.bbclass:72: echo 'export > PKG_CONFIG_PATH=${PKG_CONFIG_PATH}' >> $script > > > > -- > > Tom > > > > -- > > ___ > > linux-yocto mailing list > > linux-yocto@yoctoproject.org > > https://lists.yoctoproject.org/listinfo/linux-yocto > -- Yihe Chen(陈统) +86 153 1193 5295 http://www.juliantec.info/julblog/yihect 中国北京西城区玉桃园三区 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] v4.18.x - stable updates comprising v4.18.37
Bruce, Yocto kernel folks: Here is the next 4.18.x stable update "extension" primarily created for the Yocto project, continuing from the previous v4.18.36 release. There are just over 30 commits here, based only on commits chosen from what was used in the MDS stable releases that came out today. This content is specific to the MDS issue, both here and in 4.19.43. In fact, to speed up turn around time, I didn't re-export the selected commits from mainline, but used the 4.19.43 versions directly. I also set aside my work-in-progress content - it will be in the next release. By inspecting the 4.14.119 release as well, I located an additional patch that arrived in 4.19-rc1, and hence would also be needed here for this 4.18.x release. Other than that, the commit series in 4.14 and 4.19 are nearly identical, which gives another good sanity check on things being complete and no hidden/implicit dependencies here. For those that haven't (yet) heard about MDS, you can start with: Documentation/admin-guide/hw-vuln/mds.rst in kernels that have had updates applied. It will give you keywords and basic information that you can use to search out more details. As this was x86 specific, I skipped the usual MIPS/ARM/PPC builds for this one topic specific release. I boot tested on x86-64 and checked for the new MDS messages/content documented above. I did the signed tag just as per the previously released versions. Please find a signed v4.18.37 tag using this key: http://pgp.mit.edu/pks/lookup?op=vindex=0xEBCE84042C07D1D6 in the repo in the kernel.org directory here: https://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux-4.18.y.git/?h=linux-4.18.y git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux-4.18.y.git for merge to standard/base in linux-yocto-4.18 and then out from there into the other base and BSP branches. For those who are interested, the evolution of the commits is here: https://git.kernel.org/cgit/linux/kernel/git/paulg/longterm-queue-4.18.git/ This repo isn't needed for anything; it just exists for transparency and so people can see the evolution of the raw commits that were originally selected to create this 4.18.x release. Paul. -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [kernel-cache] [yocto-4.1] bsp/axxiaarm64: Updated AXXIA X9 EDAC options
Disabled correctable errors reporting for SYSMEM and CMEM by default. EDAC_AXXIA_SYSMEM_SKIP_CORRECTABLE: Support for deactivation of processing of SYSMEM correctable errors (single and multiple ECC). EDAC_AXXIA_CMEM_SKIP_CORRECTABLE Support for deactivation of processing of CMEM correctable errors (single and multiple ECC). Signed-off-by: Daniel Dragomir --- bsp/axxiaarm64/edac.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bsp/axxiaarm64/edac.cfg b/bsp/axxiaarm64/edac.cfg index 74235bf..3f29703 100644 --- a/bsp/axxiaarm64/edac.cfg +++ b/bsp/axxiaarm64/edac.cfg @@ -17,5 +17,7 @@ CONFIG_EDAC_AXXIA_SYSMEM_5600=y CONFIG_EDAC_AXXIA_CMEM_5600=y CONFIG_EDAC_AXXIA_L3_5600=y CONFIG_EDAC_AXXIA_L2_CPU_5600=y +CONFIG_EDAC_AXXIA_SYSMEM_SKIP_CORRECTABLE=y +CONFIG_EDAC_AXXIA_CMEM_SKIP_CORRECTABLE=y # CONFIG_LSI_SMMON is not set -- 2.7.4 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [PATCH 4/5] virtio-net: Check the Return Code of skb_to_sgvec()
From: John Jacques Signed-off-by: John Jacques --- drivers/net/virtio_net.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 9ecc6ca..6337549 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -550,11 +550,14 @@ static int add_recvbuf_small(struct virtnet_info *vi, struct receive_queue *rq, hdr = skb_vnet_hdr(skb); sg_init_table(rq->sg, MAX_SKB_FRAGS + 2); sg_set_buf(rq->sg, hdr, vi->hdr_len); - skb_to_sgvec(skb, rq->sg + 1, 0, skb->len); - - err = virtqueue_add_inbuf(rq->vq, rq->sg, 2, skb, gfp); - if (err < 0) + err = skb_to_sgvec(skb, rq->sg + 1, 0, skb->len); + if (err < 0) { dev_kfree_skb(skb); + } else { + err = virtqueue_add_inbuf(rq->vq, rq->sg, 2, skb, gfp); + if (err < 0) + dev_kfree_skb(skb); + } return err; } -- 2.7.4 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [PATCH 1/5] drivers/misc: Update Memory Allocation in axxia-oem.c
From: John Jacques Memory allocation in axxia-oem.c was not allocating a byte for the termination character. Signed-off-by: John Jacques --- drivers/misc/axxia-oem.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/misc/axxia-oem.c b/drivers/misc/axxia-oem.c index 0599242..e46ee71 100644 --- a/drivers/misc/axxia-oem.c +++ b/drivers/misc/axxia-oem.c @@ -92,7 +92,7 @@ axxia_dspc_write(struct file *file, const char __user *buffer, char *input; unsigned long mask; - input = kmalloc(count, __GFP_WAIT); + input = kmalloc(count + 1, __GFP_WAIT); if (NULL == input) return -ENOSPC; @@ -146,7 +146,7 @@ axxia_actlr_el3_write(struct file *file, const char __user *buffer, { char *input; - input = kmalloc(count, __GFP_WAIT); + input = kmalloc(count + 1, __GFP_WAIT); if (NULL == input) return -ENOSPC; @@ -199,7 +199,7 @@ axxia_actlr_el2_write(struct file *file, const char __user *buffer, { char *input; - input = kmalloc(count, __GFP_WAIT); + input = kmalloc(count + 1, __GFP_WAIT); if (NULL == input) return -ENOSPC; @@ -255,7 +255,7 @@ axxia_ccn_offset_write(struct file *file, const char __user *buffer, char *input; unsigned int new_ccn_offset; - input = kmalloc(count, __GFP_WAIT); + input = kmalloc(count + 1, __GFP_WAIT); if (NULL == input) return -ENOSPC; @@ -316,7 +316,7 @@ axxia_ccn_value_write(struct file *file, const char __user *buffer, { char *input; - input = kmalloc(count, __GFP_WAIT); + input = kmalloc(count + 1, __GFP_WAIT); if (NULL == input) return -ENOSPC; -- 2.7.4 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [PATCH 3/5] drivers/edac: Added compile time option.
From: Marek Majtyka Added new compile time option in order to disable reporting of correctable errors via interrupt (which means disabling them completely for CMEM and SYSMEM). Signed-off-by: Marek Majtyka --- drivers/edac/Kconfig | 18 +++- drivers/edac/axxia_edac-cmc_56xx.c | 91 +++--- drivers/edac/axxia_edac-mc_56xx.c | 25 ++- 3 files changed, 104 insertions(+), 30 deletions(-) diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig index 5588930..daf63f7 100644 --- a/drivers/edac/Kconfig +++ b/drivers/edac/Kconfig @@ -420,9 +420,17 @@ config DEBUG_EDAC_AXXIA_SYSMEM Support for configuration of SYSMEM edac tracing functionality. It works for both 5600 and 6700 board families. +config EDAC_AXXIA_SYSMEM_SKIP_CORRECTABLE + depends on ARCH_AXXIA + bool "AXXIA EDAC SYSMEM correctable error disabled." + help + Support for deactivation of processing of SYSMEM correctable errors + (single and multiple ECC). + It works for both 5600 and 6700 board families. + config EDAC_AXXIA_CMEM_5600 depends on ARCH_AXXIA - bool "AXXIA EDAC CMem Controller for 5600" + bool "AXXIA EDAC CMEM Controller for 5600" help Support for Configuration Memory Denali controller error detection on the AXXIA AXM56xx devices. This enables @@ -447,6 +455,14 @@ config DEBUG_EDAC_AXXIA_CMEM Enables error injection functionality for CMEM over procfs interface (/proc/driver/). +config EDAC_AXXIA_CMEM_SKIP_CORRECTABLE + depends on ARCH_AXXIA + bool "AXXIA EDAC CMEM correctable error disabled." + help + Support for deactivation of processing of CMEM correctable errors + (single and multiple ECC). + It works for both 5600 and 6700 board families. + config EDAC_AXXIA_L3_5500 tristate "AXXIA EDAC L3 Controller for 5500" help diff --git a/drivers/edac/axxia_edac-cmc_56xx.c b/drivers/edac/axxia_edac-cmc_56xx.c index f29e6926..0e231cb 100644 --- a/drivers/edac/axxia_edac-cmc_56xx.c +++ b/drivers/edac/axxia_edac-cmc_56xx.c @@ -104,33 +104,60 @@ INT_BIT_8 |\ INT_BIT_31)) -#define CM_INT_MASK_BASE (~(\ - INT_BIT_1 |\ - INT_BIT_2 |\ - INT_BIT_3 |\ - INT_BIT_4 |\ - INT_BIT_5 |\ - INT_BIT_6 |\ - INT_BIT_7 |\ - INT_BIT_11 |\ - INT_BIT_21 |\ - INT_BIT_23 |\ - INT_BIT_31)) - -#define CM_INT_MASK_FULL (~(\ - INT_BIT_1 |\ - INT_BIT_2 |\ - INT_BIT_3 |\ - INT_BIT_4 |\ - INT_BIT_5 |\ - INT_BIT_6 |\ - INT_BIT_7 |\ - INT_BIT_11 |\ - INT_BIT_21 |\ - INT_BIT_23 |\ - INT_BIT_25 |\ - INT_BIT_30 |\ - INT_BIT_31)) +#if defined(CONFIG_EDAC_AXXIA_CMEM_SKIP_CORRECTABLE) + #define CM_INT_MASK_BASE (~(\ + INT_BIT_1 |\ + INT_BIT_2 |\ + INT_BIT_5 |\ + INT_BIT_6 |\ + INT_BIT_7 |\ + INT_BIT_11 |\ + INT_BIT_21 |\ + INT_BIT_23 |\ + INT_BIT_31)) + + #define CM_INT_MASK_FULL (~(\ + INT_BIT_1 |\ + INT_BIT_2 |\ + INT_BIT_5 |\ + INT_BIT_6 |\ + INT_BIT_7 |\ + INT_BIT_11 |\ + INT_BIT_21 |\ + INT_BIT_23 |\ + INT_BIT_25 |\ + INT_BIT_30 |\ + INT_BIT_31)) +#else + + #define CM_INT_MASK_BASE (~(\ + INT_BIT_1 |\ + INT_BIT_2 |\ + INT_BIT_3 |\ + INT_BIT_4 |\ + INT_BIT_5 |\ + INT_BIT_6 |\ + INT_BIT_7 |\ + INT_BIT_11 |\ + INT_BIT_21 |\ + INT_BIT_23 |\ + INT_BIT_31)) + + #define CM_INT_MASK_FULL (~(\ + INT_BIT_1 |\ + INT_BIT_2 |\ + INT_BIT_3 |\ +
[linux-yocto] [PATCH 0/5] Intel Axxia updates to linux-yocto-4.1
Hello Bruce! I know 4.1 is not supported anymore, but if possible, please review and merge this series of patches in Axxia branches from linux-yocto-4.1: - standard/axxia/base - standard/preempt-rt/axxia/base Changes included in this series (axxia tag 1.76): - Fix compile warnings introduced by the rebase in 1.75. - EDAC update to allow polling of correctable errors. - Fix allocation error in axxia-oem. Thank you, Daniel John Jacques (3): drivers/misc: Update Memory Allocation in axxia-oem.c virtio-net: Check the Return Code of skb_to_sgvec() net/ipv4: Check the Return Code of skb_to_sgvec() Marek Majtyka (2): driver/edac: Added new kernel cmdline parameter. drivers/edac: Added compile time option. drivers/edac/Kconfig | 18 +++- drivers/edac/axxia_edac-cmc_56xx.c | 91 +++--- drivers/edac/axxia_edac-l3_56xx.c | 56 +-- drivers/edac/axxia_edac-mc_56xx.c | 25 ++- drivers/misc/axxia-oem.c | 10 ++--- drivers/net/virtio_net.c | 11 +++-- net/ipv4/ah4.c | 8 +++- net/ipv4/esp4.c| 13 -- 8 files changed, 173 insertions(+), 59 deletions(-) -- 2.7.4 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [PATCH 5/5] net/ipv4: Check the Return Code of skb_to_sgvec()
From: John Jacques Signed-off-by: John Jacques --- net/ipv4/ah4.c | 8 ++-- net/ipv4/esp4.c | 13 + 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c index 0157f09..339f28a 100644 --- a/net/ipv4/ah4.c +++ b/net/ipv4/ah4.c @@ -220,7 +220,9 @@ static int ah_output(struct xfrm_state *x, struct sk_buff *skb) ah->seq_no = htonl(XFRM_SKB_CB(skb)->seq.output.low); sg_init_table(sg, nfrags + sglists); - skb_to_sgvec_nomark(skb, sg, 0, skb->len); + err = skb_to_sgvec_nomark(skb, sg, 0, skb->len); + if (err < 0) + goto out_free; if (x->props.flags & XFRM_STATE_ESN) { /* Attach seqhi sg right after packet payload */ @@ -391,7 +393,9 @@ static int ah_input(struct xfrm_state *x, struct sk_buff *skb) skb_push(skb, ihl); sg_init_table(sg, nfrags + sglists); - skb_to_sgvec_nomark(skb, sg, 0, skb->len); + err = skb_to_sgvec_nomark(skb, sg, 0, skb->len); + if (err < 0) + goto out_free; if (x->props.flags & XFRM_STATE_ESN) { /* Attach seqhi sg right after packet payload */ diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index 30b544f..3edef57 100644 --- a/net/ipv4/esp4.c +++ b/net/ipv4/esp4.c @@ -239,9 +239,11 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb) esph->seq_no = htonl(XFRM_SKB_CB(skb)->seq.output.low); sg_init_table(sg, nfrags); - skb_to_sgvec(skb, sg, -esph->enc_data + crypto_aead_ivsize(aead) - skb->data, -clen + alen); + err = skb_to_sgvec(skb, sg, + esph->enc_data + crypto_aead_ivsize(aead) - skb->data, + clen + alen); + if (err < 0) + goto error; if ((x->props.flags & XFRM_STATE_ESN)) { sg_init_table(asg, 3); @@ -429,7 +431,10 @@ static int esp_input(struct xfrm_state *x, struct sk_buff *skb) iv = esph->enc_data; sg_init_table(sg, nfrags); - skb_to_sgvec(skb, sg, sizeof(*esph) + crypto_aead_ivsize(aead), elen); + err = skb_to_sgvec(skb, sg, + sizeof(*esph) + crypto_aead_ivsize(aead), elen); + if (err < 0) + goto out; if ((x->props.flags & XFRM_STATE_ESN)) { sg_init_table(asg, 3); -- 2.7.4 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [PATCH 2/5] driver/edac: Added new kernel cmdline parameter.
From: Marek Majtyka Added 'l3_polling_mode' boot parameter for forcing usage of polling mode instead of interrupt for edac L3 cache driver. Signed-off-by: Marek Majtyka --- drivers/edac/axxia_edac-l3_56xx.c | 56 +-- 1 file changed, 42 insertions(+), 14 deletions(-) diff --git a/drivers/edac/axxia_edac-l3_56xx.c b/drivers/edac/axxia_edac-l3_56xx.c index ed8c1d3..ff13b71 100644 --- a/drivers/edac/axxia_edac-l3_56xx.c +++ b/drivers/edac/axxia_edac-l3_56xx.c @@ -12,6 +12,7 @@ #define CREATE_TRACE_POINTS #include +#include #include #include #include @@ -80,6 +81,7 @@ #define CCN_NODE_ERR_SYND_CLR 0x480 static cpumask_t only_cpu_0 = { CPU_BITS_CPU0}; +static int l3_pmode; union dickens_hnf_err_syndrome_reg0 { struct __packed { @@ -174,6 +176,20 @@ struct intel_edac_dev_info { void (*check)(struct edac_device_ctl_info *edac_dev); }; + +static int __init l3_polling_mode(char *str) +{ + int polling_mode; + + if (get_option(, _mode)) { + l3_pmode = polling_mode; + return 0; + } + return -EINVAL; +} + +early_param("l3_polling_mode", l3_polling_mode); + static void clear_node_error(void __iomem *addr) { union dickens_hnf_err_syndrome_clr err_syndrome_clr; @@ -305,7 +321,8 @@ static irqreturn_t collect_and_clean(struct intel_edac_dev_info *dev_info, err_synd_reg1); dev_info->data_hni[i].err_synd_reg0 = err_synd_reg0; dev_info->data_hni[i].err_synd_reg1 = err_synd_reg1; - dev_info->data_hni[i].idx = 0; + dev_info->data_hni[i].idx = CCN_HNF_NODES + + CCN_XP_NODES + i; clear_node_error(ccn_base + CCN_HNI_NODE_BASE_ADDR(i) + CCN_NODE_ERR_SYND_CLR); @@ -345,6 +362,7 @@ static irqreturn_t collect_and_clean(struct intel_edac_dev_info *dev_info, dev_info->data_xp[i].err_synd_reg0 = err_synd_reg0; dev_info->data_xp[i].err_synd_reg1 = 0; + dev_info->data_xp[i].idx = CCN_HNF_NODES + i; trace_edacl3_syndromes(err_synd_reg0, err_synd_reg1); @@ -414,7 +432,8 @@ static void intel_l3_error_check(struct edac_device_ctl_info *edac_dev) count = err_syndrome_reg0.reg0.err_count; if (count) edac_device_handle_multi_ce(edac_dev, 0, - instance, count, edac_dev->ctl_name); + dev_info->data[instance].idx, count, + edac_dev->ctl_name); /* clear the valid bit */ clear_node_error(addr + CCN_NODE_ERR_SYND_CLR); @@ -459,10 +478,11 @@ static int intel_edac_l3_probe(struct platform_device *pdev) np->name); goto err1; } + /* for the moment only HNF errors are reported via sysfs */ dev_info->edac_dev = edac_device_alloc_ctl_info(0, dev_info->ctl_name, 1, dev_info->blk_name, - CCN_HNI_NODES, 0, NULL, 0, + CCN_HNF_NODES, 0, NULL, 0, dev_info->edac_idx); if (!dev_info->edac_dev) { pr_info("No memory for edac device\n"); @@ -481,20 +501,26 @@ static int intel_edac_l3_probe(struct platform_device *pdev) * Once -1 return, it means old uboot without ccn service. * Then only polling mechanism is allowed, as it was before. */ - __arm_smccc_smc(0xc427, CCN_MN_ERRINT_STATUS__PMU_EVENTS__DISABLE, - 0, 0, ); - trace_edacl3_smc_results(); - - if (ret.a0 != ARM_SMCCC_UNKNOWN) { - irqreturn_t res; - dev_info->irq_used = 1; - /* clear all error from earlier boot stage */ - res = collect_and_clean(dev_info, 0); + if (l3_pmode) { + dev_info->irq_used = 0; + } else { __arm_smccc_smc(0xc427, - CCN_MN_ERRINT_STATUS__INTREQ__DESSERT, - 0, 0, ); + CCN_MN_ERRINT_STATUS__PMU_EVENTS__DISABLE, + 0, 0, ); trace_edacl3_smc_results(); + + if (ret.a0 != ARM_SMCCC_UNKNOWN) { + irqreturn_t res; + + dev_info->irq_used = 1; + /* clear all error from earlier boot stage */ + res = collect_and_clean(dev_info, 0); +
Re: [linux-yocto] how to add recipe-sysroot-native to PKG_CONFIG_PATH for linux-yocto
You probably need to add a dependency on glib-2.0 to your recipe, then the needed pkgconfig will be in the target sysroot. If you can copy-paste the entire recipe, that would help. Alex On Tue, 14 May 2019 at 11:06, Tong Chen wrote: > > Hi all: > I'm adding some kernel extensions to poky. In summary, I need to extend > kallsyms, and the new functionality depends on glib-2.0. > So I added pkg-confi in the ./scripts/Makefile: > > HOSTCFLAGS_kallsyms.o := $(shell pkg-config --cflags glib-2.0) > -I$(srctree)/scripts > HOSTLDLIBS_kallsyms := $(shell pkg-config --libs glib-2.0) -ldw > > But when compiling with bitbake, the following error occurs: > > | Package glib-2.0 was not found in the pkg-config search path. > | Perhaps you should add the directory containing `glib-2.0.pc' > | to the PKG_CONFIG_PATH environment variable > | No package 'glib-2.0' found > > Extrat the setting of PKG_CONFIG_PATH from temp/run.do_compile: > > Export > PKG_CONFIG_PATH="/home/hchan/code/poky_new/poky/build_ctd/tmp/work/qemux86_64-poky-linux/linux-yocto/5.0.7+gitAUTOINC+d26eec23cf_891531d68e-r0/recipe-sysroot/usr/lib/pkgconfig > > :/home/hchan/code/poky_new/poky/build_ctd/tmp/work/qemux86_64-poky-linux/linux-yocto/5.0.7+gitAUTOINC+d26eec23cf_891531d68e-r0/recipe-sysroot/usr/share/pkgconfig" > > Look at the recipe-sysroot directory, where there is no corresponding > glib-2.0.pc file, but in the recipe-sysroot-native directory, there is: > > ./recipe-sysroot-native/usr/lib/pkgconfig/glib-2.0.pc > > So my question is how to insert recipe-sysroot-native directory to > PKG_CONFIG_PATH variable? > > I am not particularly familiar with poky/bitbake at the moment. By searching, > I found these assignments. But not sure where to add it, and how to add: > > Hchan@hchan-ThinkPad:~/code/poky_new/poky$ grep --color -rnH 'export > PKG_CONFIG_PATH=' ./meta* > ./meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-native.in:3:export > PKG_CONFIG_PATH="@PATH_NATIVE@" > ./meta/recipes-devtools/qemu/qemu.inc:85: export > PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH > ./meta/classes/toolchain-scripts.bbclass:49: echo 'export > PKG_CONFIG_PATH=$SDKTARGETSYSROOT'"$libdir"'/pkgconfig:$SDKTARGETSYSROOT'"$prefix"'/share/pkgconfig' > >> $script > ./meta/classes/toolchain-scripts.bbclass:72: echo 'export > PKG_CONFIG_PATH=${PKG_CONFIG_PATH}' >> $script > > -- > Tom > > -- > ___ > linux-yocto mailing list > linux-yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/linux-yocto -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [linux-yocto master v5.0/base][PATCH] ALSA: hda - Register irq handler after the chip initialization
From: Takashi Iwai commit f495222e28275222ab6fd93813bd3d462e16d340 upstream. Currently the IRQ handler in HD-audio controller driver is registered before the chip initialization. That is, we have some window opened between the azx_acquire_irq() call and the CORB/RIRB setup. If an interrupt is triggered in this small window, the IRQ handler may access to the uninitialized RIRB buffer, which leads to a NULL dereference Oops. This is usually no big problem since most of Intel chips do register the IRQ via MSI, and we've already fixed the order of the IRQ enablement and the CORB/RIRB setup in the former commit b61749a89f82 ("sound: enable interrupt after dma buffer initialization"), hence the IRQ won't be triggered in that room. However, some platforms use a shared IRQ, and this may allow the IRQ trigger by another source. Another possibility is the kdump environment: a stale interrupt might be present in there, the IRQ handler can be falsely triggered as well. For covering this small race, let's move the azx_acquire_irq() call after hda_intel_init_chip() call. Although this is a bit radical change, it can cover more widely than checking the CORB/RIRB setup locally in the callee side. Reported-by: Liwei Song Signed-off-by: Takashi Iwai Signed-off-by: Liwei Song --- sound/pci/hda/hda_intel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index e5c49003e75f..7aeb5e81aa94 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -1788,9 +1788,6 @@ static int azx_first_init(struct azx *chip) chip->msi = 0; } - if (azx_acquire_irq(chip, 0) < 0) - return -EBUSY; - pci_set_master(pci); synchronize_irq(bus->irq); @@ -1904,6 +1901,9 @@ static int azx_first_init(struct azx *chip) return -ENODEV; } + if (azx_acquire_irq(chip, 0) < 0) + return -EBUSY; + strcpy(card->driver, "HDA-Intel"); strlcpy(card->shortname, driver_short_names[chip->driver_type], sizeof(card->shortname)); -- 2.7.4 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] how to add recipe-sysroot-native to PKG_CONFIG_PATH for linux-yocto
Hi all: I'm adding some kernel extensions to poky. In summary, I need to extend kallsyms, and the new functionality depends on glib-2.0. So I added pkg-confi in the ./scripts/Makefile: HOSTCFLAGS_kallsyms.o := $(shell pkg-config --cflags glib-2.0) -I$(srctree)/scripts HOSTLDLIBS_kallsyms := $(shell pkg-config --libs glib-2.0) -ldw But when compiling with bitbake, the following error occurs: | Package glib-2.0 was not found in the pkg-config search path. | Perhaps you should add the directory containing `glib-2.0.pc' | to the PKG_CONFIG_PATH environment variable | No package 'glib-2.0' found Extrat the setting of PKG_CONFIG_PATH from temp/run.do_compile: Export PKG_CONFIG_PATH="/home/hchan/code/poky_new/poky/build_ctd/tmp/work/qemux86_64-poky-linux/linux-yocto/5.0.7+gitAUTOINC+d26eec23cf_891531d68e-r0/recipe-sysroot/usr/lib/pkgconfig :/home/hchan/code/poky_new/poky/build_ctd/tmp/work/qemux86_64-poky-linux/linux-yocto/5.0.7+gitAUTOINC+d26eec23cf_891531d68e-r0/recipe-sysroot/usr/share/pkgconfig" Look at the recipe-sysroot directory, where there is no corresponding glib-2.0.pc file, but in the recipe-sysroot-native directory, there is: ./recipe-sysroot-native/usr/lib/pkgconfig/glib-2.0.pc So my question is how to insert recipe-sysroot-native directory to PKG_CONFIG_PATH variable? I am not particularly familiar with poky/bitbake at the moment. By searching, I found these assignments. But not sure where to add it, and how to add: Hchan@hchan-ThinkPad:~/code/poky_new/poky$ grep --color -rnH 'export PKG_CONFIG_PATH=' ./meta* ./meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-native.in:3:export PKG_CONFIG_PATH="@PATH_NATIVE@" ./meta/recipes-devtools/qemu/qemu.inc:85: export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH ./meta/classes/toolchain-scripts.bbclass:49: echo 'export PKG_CONFIG_PATH=$SDKTARGETSYSROOT'"$libdir"'/pkgconfig:$SDKTARGETSYSROOT'"$prefix"'/share/pkgconfig' >> $script ./meta/classes/toolchain-scripts.bbclass:72: echo 'export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}' >> $script -- Tom -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto