Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp4988160rdb; Sat, 30 Dec 2023 00:44:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IHnaZDpotmu8GWjnRumFLYcbpJX0enirlw7dD5LZcfSREJ7OXQQxjc7VGkkPVN1skdhMoUo X-Received: by 2002:a05:6870:d88c:b0:203:e866:5141 with SMTP id oe12-20020a056870d88c00b00203e8665141mr16965438oac.56.1703925891988; Sat, 30 Dec 2023 00:44:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703925891; cv=none; d=google.com; s=arc-20160816; b=daNtM61C3ScifLQmWYIPc6xc4IhTFch12QmUxjVHERTBNfre8LQEk10WM5hPNccXUB deCBTMm14HCNQGZKjIB8nZ4g0pw0XI/IC18NuKqHHtTry2r1lk0TeAU3MgpBo9l94Q1K PY8/3wIliM7PQ19sTnPlVjNNxhjcXxVQo3hI8B4eR4uVB1173xA939Fn6ohddVmnVi7c QUKbahKAdbVuAJN2HXkKe9PJPOZNGnqDLuO3adeAOKOUFIyIQ5eIJZMI+MYFHUAcfuMx km8V/SmsTF49XDuvw96ooKAUzC9AgDrj4QMfAlLmWuyLufjWrEkx/kAal+LSoPe8Wdkm fJrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=wSwRrlafCNTQF7TbJ3sPKPMi+20th2eSBOd8m4vFVO0=; fh=YPKr4TX/VNlJHlc1If43tIpMKjDxj+0Ozadj5HWqbHw=; b=IQ7hSMZW96YEvVNmqJdNai5nglFh54EeB9O8/DnjOdyi9b4pevOWoQswDk8Fo3hkiV lBS+cpKi5jPPvvJclV+b8D1IPXBydOkCqAIHDung7pvMhrFE89GWP5JJMm+QJ/O5yxDq 2Xali9yVqDNgwnFUcV9e3Xfd4VtfB4K3NgquPyged8XH3jj7OVUh0c/WY2CFj1hbjdfv xfWtiLu8gPUu8/KRRtB/ctvAlVdIOuDR+FP0rVPI3WsJWBmubLkOP/Q9gqvF5YOpwHdU PivOSpFWd4ToFgD26zYSLazHzgAViByBefae7De/s0seA5OHJLYcCoS8twQ8m9T71l4I AAvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HYO6b3Ex; spf=pass (google.com: domain of linux-kernel+bounces-13366-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13366-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 37-20020a631465000000b005ce76c7c92csi1600051pgu.472.2023.12.30.00.44.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Dec 2023 00:44:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13366-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HYO6b3Ex; spf=pass (google.com: domain of linux-kernel+bounces-13366-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13366-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id D6C33B2143D for ; Sat, 30 Dec 2023 08:44:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0EFD723A0; Sat, 30 Dec 2023 08:44:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="HYO6b3Ex" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 000095239; Sat, 30 Dec 2023 08:44:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703925863; x=1735461863; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=kP48Qr7mS35FgW5l3bihWVKTEbnJqD/ev/ndiwrg9tM=; b=HYO6b3ExF5WQx7Pb8Da0mbIZNb+ic2SxHyLxkzrP9mMmjC8GEpUcSH0s AMpXQ8ijGUv4A3TYq2eVeLfo7RKL9WZN0+8b++A+yJWjn1+KkGcGWi2uz WpL53jU02rwdvftYpBj9ZpzPuwrYi3sNkiR0vl4Jd0tumzDmixaNXUOVy G0KKD2LS+N5tRhrv1paAM9dAfyMLPvplVlf9rKFpKLe5GA38AueGrMFPI ny3eScnCmvSUZA4tH9/5EEjCj3z8XqunCAoQIBuyKWJpdg+lvI/4M/smE A8uVpjds04o0bQsftGApFjPooys3Kf5k+CJ5HIcDIuZdOLtysxJ3cBBr7 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10938"; a="376184511" X-IronPort-AV: E=Sophos;i="6.04,317,1695711600"; d="scan'208";a="376184511" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Dec 2023 00:44:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10938"; a="1026075769" X-IronPort-AV: E=Sophos;i="6.04,317,1695711600"; d="scan'208";a="1026075769" Received: from lkp-server02.sh.intel.com (HELO b07ab15da5fe) ([10.239.97.151]) by fmsmga006.fm.intel.com with ESMTP; 30 Dec 2023 00:44:19 -0800 Received: from kbuild by b07ab15da5fe with local (Exim 4.96) (envelope-from ) id 1rJUx7-000IHJ-16; Sat, 30 Dec 2023 08:44:17 +0000 Date: Sat, 30 Dec 2023 16:43:35 +0800 From: kernel test robot To: Takashi Sakamoto , linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, adamg@pobox.com, stable@vger.kernel.org, Jiri Slaby , Mario Limonciello , Tobias Gruetzmacher Subject: Re: [PATCH] firewire: ohci: suppress unexpected system reboot in AMD Ryzen machines and ASM108x/VT630x PCIe cards Message-ID: <202312301629.2sCcBeRp-lkp@intel.com> References: <20231229035735.11127-1-o-takashi@sakamocchi.jp> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231229035735.11127-1-o-takashi@sakamocchi.jp> Hi Takashi, kernel test robot noticed the following build errors: [auto build test ERROR on ieee1394-linux1394/for-next] [also build test ERROR on ieee1394-linux1394/for-linus linus/master v6.7-rc7 next-20231222] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Takashi-Sakamoto/firewire-ohci-suppress-unexpected-system-reboot-in-AMD-Ryzen-machines-and-ASM108x-VT630x-PCIe-cards/20231229-120311 base: https://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394.git for-next patch link: https://lore.kernel.org/r/20231229035735.11127-1-o-takashi%40sakamocchi.jp patch subject: [PATCH] firewire: ohci: suppress unexpected system reboot in AMD Ryzen machines and ASM108x/VT630x PCIe cards config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20231230/202312301629.2sCcBeRp-lkp@intel.com/config) compiler: clang version 18.0.0git (https://github.com/llvm/llvm-project 8a4266a626914765c0c69839e8a51be383013c1a) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231230/202312301629.2sCcBeRp-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202312301629.2sCcBeRp-lkp@intel.com/ All errors (new ones prefixed by >>): >> drivers/firewire/ohci.c:3679:59: error: too many arguments provided to function-like macro invocation 3679 | if (detect_vt630x_with_asm1083_on_amd_ryzen_machine(dev, ohci)) | ^ drivers/firewire/ohci.c:3573:9: note: macro 'detect_vt630x_with_asm1083_on_amd_ryzen_machine' defined here 3573 | #define detect_vt630x_with_asm1083_on_amd_ryzen_machine(pdev) false | ^ >> drivers/firewire/ohci.c:3679:6: error: use of undeclared identifier 'detect_vt630x_with_asm1083_on_amd_ryzen_machine' 3679 | if (detect_vt630x_with_asm1083_on_amd_ryzen_machine(dev, ohci)) | ^ 2 errors generated. vim +3679 drivers/firewire/ohci.c 3617 3618 static int pci_probe(struct pci_dev *dev, 3619 const struct pci_device_id *ent) 3620 { 3621 struct fw_ohci *ohci; 3622 u32 bus_options, max_receive, link_speed, version; 3623 u64 guid; 3624 int i, err; 3625 size_t size; 3626 3627 if (dev->vendor == PCI_VENDOR_ID_PINNACLE_SYSTEMS) { 3628 dev_err(&dev->dev, "Pinnacle MovieBoard is not yet supported\n"); 3629 return -ENOSYS; 3630 } 3631 3632 ohci = devres_alloc(release_ohci, sizeof(*ohci), GFP_KERNEL); 3633 if (ohci == NULL) 3634 return -ENOMEM; 3635 fw_card_initialize(&ohci->card, &ohci_driver, &dev->dev); 3636 pci_set_drvdata(dev, ohci); 3637 pmac_ohci_on(dev); 3638 devres_add(&dev->dev, ohci); 3639 3640 err = pcim_enable_device(dev); 3641 if (err) { 3642 dev_err(&dev->dev, "failed to enable OHCI hardware\n"); 3643 return err; 3644 } 3645 3646 pci_set_master(dev); 3647 pci_write_config_dword(dev, OHCI1394_PCI_HCI_Control, 0); 3648 3649 spin_lock_init(&ohci->lock); 3650 mutex_init(&ohci->phy_reg_mutex); 3651 3652 INIT_WORK(&ohci->bus_reset_work, bus_reset_work); 3653 3654 if (!(pci_resource_flags(dev, 0) & IORESOURCE_MEM) || 3655 pci_resource_len(dev, 0) < OHCI1394_REGISTER_SIZE) { 3656 ohci_err(ohci, "invalid MMIO resource\n"); 3657 return -ENXIO; 3658 } 3659 3660 err = pcim_iomap_regions(dev, 1 << 0, ohci_driver_name); 3661 if (err) { 3662 ohci_err(ohci, "request and map MMIO resource unavailable\n"); 3663 return -ENXIO; 3664 } 3665 ohci->registers = pcim_iomap_table(dev)[0]; 3666 3667 for (i = 0; i < ARRAY_SIZE(ohci_quirks); i++) 3668 if ((ohci_quirks[i].vendor == dev->vendor) && 3669 (ohci_quirks[i].device == (unsigned short)PCI_ANY_ID || 3670 ohci_quirks[i].device == dev->device) && 3671 (ohci_quirks[i].revision == (unsigned short)PCI_ANY_ID || 3672 ohci_quirks[i].revision >= dev->revision)) { 3673 ohci->quirks = ohci_quirks[i].flags; 3674 break; 3675 } 3676 if (param_quirks) 3677 ohci->quirks = param_quirks; 3678 > 3679 if (detect_vt630x_with_asm1083_on_amd_ryzen_machine(dev, ohci)) 3680 ohci->quirks |= QUIRK_REBOOT_BY_CYCLE_TIMER_READ; 3681 3682 /* 3683 * Because dma_alloc_coherent() allocates at least one page, 3684 * we save space by using a common buffer for the AR request/ 3685 * response descriptors and the self IDs buffer. 3686 */ 3687 BUILD_BUG_ON(AR_BUFFERS * sizeof(struct descriptor) > PAGE_SIZE/4); 3688 BUILD_BUG_ON(SELF_ID_BUF_SIZE > PAGE_SIZE/2); 3689 ohci->misc_buffer = dmam_alloc_coherent(&dev->dev, PAGE_SIZE, &ohci->misc_buffer_bus, 3690 GFP_KERNEL); 3691 if (!ohci->misc_buffer) 3692 return -ENOMEM; 3693 3694 err = ar_context_init(&ohci->ar_request_ctx, ohci, 0, 3695 OHCI1394_AsReqRcvContextControlSet); 3696 if (err < 0) 3697 return err; 3698 3699 err = ar_context_init(&ohci->ar_response_ctx, ohci, PAGE_SIZE/4, 3700 OHCI1394_AsRspRcvContextControlSet); 3701 if (err < 0) 3702 return err; 3703 3704 err = context_init(&ohci->at_request_ctx, ohci, 3705 OHCI1394_AsReqTrContextControlSet, handle_at_packet); 3706 if (err < 0) 3707 return err; 3708 3709 err = context_init(&ohci->at_response_ctx, ohci, 3710 OHCI1394_AsRspTrContextControlSet, handle_at_packet); 3711 if (err < 0) 3712 return err; 3713 3714 reg_write(ohci, OHCI1394_IsoRecvIntMaskSet, ~0); 3715 ohci->ir_context_channels = ~0ULL; 3716 ohci->ir_context_support = reg_read(ohci, OHCI1394_IsoRecvIntMaskSet); 3717 reg_write(ohci, OHCI1394_IsoRecvIntMaskClear, ~0); 3718 ohci->ir_context_mask = ohci->ir_context_support; 3719 ohci->n_ir = hweight32(ohci->ir_context_mask); 3720 size = sizeof(struct iso_context) * ohci->n_ir; 3721 ohci->ir_context_list = devm_kzalloc(&dev->dev, size, GFP_KERNEL); 3722 if (!ohci->ir_context_list) 3723 return -ENOMEM; 3724 3725 reg_write(ohci, OHCI1394_IsoXmitIntMaskSet, ~0); 3726 ohci->it_context_support = reg_read(ohci, OHCI1394_IsoXmitIntMaskSet); 3727 /* JMicron JMB38x often shows 0 at first read, just ignore it */ 3728 if (!ohci->it_context_support) { 3729 ohci_notice(ohci, "overriding IsoXmitIntMask\n"); 3730 ohci->it_context_support = 0xf; 3731 } 3732 reg_write(ohci, OHCI1394_IsoXmitIntMaskClear, ~0); 3733 ohci->it_context_mask = ohci->it_context_support; 3734 ohci->n_it = hweight32(ohci->it_context_mask); 3735 size = sizeof(struct iso_context) * ohci->n_it; 3736 ohci->it_context_list = devm_kzalloc(&dev->dev, size, GFP_KERNEL); 3737 if (!ohci->it_context_list) 3738 return -ENOMEM; 3739 3740 ohci->self_id = ohci->misc_buffer + PAGE_SIZE/2; 3741 ohci->self_id_bus = ohci->misc_buffer_bus + PAGE_SIZE/2; 3742 3743 bus_options = reg_read(ohci, OHCI1394_BusOptions); 3744 max_receive = (bus_options >> 12) & 0xf; 3745 link_speed = bus_options & 0x7; 3746 guid = ((u64) reg_read(ohci, OHCI1394_GUIDHi) << 32) | 3747 reg_read(ohci, OHCI1394_GUIDLo); 3748 3749 if (!(ohci->quirks & QUIRK_NO_MSI)) 3750 pci_enable_msi(dev); 3751 err = devm_request_irq(&dev->dev, dev->irq, irq_handler, 3752 pci_dev_msi_enabled(dev) ? 0 : IRQF_SHARED, ohci_driver_name, ohci); 3753 if (err < 0) { 3754 ohci_err(ohci, "failed to allocate interrupt %d\n", dev->irq); 3755 goto fail_msi; 3756 } 3757 3758 err = fw_card_add(&ohci->card, max_receive, link_speed, guid); 3759 if (err) 3760 goto fail_msi; 3761 3762 version = reg_read(ohci, OHCI1394_Version) & 0x00ff00ff; 3763 ohci_notice(ohci, 3764 "added OHCI v%x.%x device as card %d, " 3765 "%d IR + %d IT contexts, quirks 0x%x%s\n", 3766 version >> 16, version & 0xff, ohci->card.index, 3767 ohci->n_ir, ohci->n_it, ohci->quirks, 3768 reg_read(ohci, OHCI1394_PhyUpperBound) ? 3769 ", physUB" : ""); 3770 3771 return 0; 3772 3773 fail_msi: 3774 pci_disable_msi(dev); 3775 3776 return err; 3777 } 3778 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki